{"id":20773898,"url":"https://github.com/simonmittag/cryptoutils","last_synced_at":"2026-05-25T04:32:03.136Z","repository":{"id":103677215,"uuid":"54824274","full_name":"simonmittag/cryptoutils","owner":"simonmittag","description":"Simple wrapper around JCE to initialise with keys from environment variables","archived":false,"fork":false,"pushed_at":"2016-08-01T16:05:28.000Z","size":236,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-18T07:43:50.191Z","etag":null,"topics":["cryptoutils","java","jce"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonmittag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-27T10:57:56.000Z","updated_at":"2020-05-14T09:58:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"724354f1-91d5-4f7f-9e0e-7b54652b95ad","html_url":"https://github.com/simonmittag/cryptoutils","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonmittag%2Fcryptoutils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonmittag%2Fcryptoutils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonmittag%2Fcryptoutils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonmittag%2Fcryptoutils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonmittag","download_url":"https://codeload.github.com/simonmittag/cryptoutils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243112187,"owners_count":20238181,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptoutils","java","jce"],"created_at":"2024-11-17T12:27:37.624Z","updated_at":"2025-12-26T04:18:20.538Z","avatar_url":"https://github.com/simonmittag.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Cryptoutils\n============\n\nProvides an ultra simple wrapper around Java's Cryptography extension (JCE) and factory methods for AES 128 Bit symmetric key ciphers, and RSA 2048 Bit asymmetric key ciphers with encryption/decryption methods. See unit test cases for details.\n\nBuilding from source\n--------------------\n\nUse maven to build:\n\n    mvn clean package\n\nImport\n------\n\nDeclare as dependency in maven\n\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.simonmittag\u003c/groupId\u003e\n      \u003cartifactId\u003ecryptoutils\u003c/artifactId\u003e\n      \u003cversion\u003e1.0\u003c/version\u003e\n    \u003c/dependency\u003e\n\nUsing the library from code\n---------------------------\n\n1) Use AsymmetricRSAKeyPairGenerator to create public/private keys (for asymmetric cipher) and save them to disk.\n\n    mvn -q exec:java -Dexec.mainClass=\"com.simonmittag.cryptoutils.asymmetric.AsymmetricRSAKeyPairGenerator\"\n\n2) Create a random 16 byte String each for symmetric secret key and init vector (for the symmetric cipher).\n\n3) put cryptoutils-1.0-SNAPSHOT.jar in your classpath, then use it like so from within code, replacing the property values with the base64 (UTF-8 Strings are ok for symmetric) encoded keys you generated in #1 and #2:\n\n    System.setProperty(\"ASYMMETRIC_PRIVATE_KEY\", \"BASE64_PRIVATE_KEY\")\n    System.setProperty(\"ASYMMETRIC_PUBLIC_KEY\", \"BASE64_PUBLIC_KEY\")\n\n    or\n\n    System.setProperty(\"SYMMETRIC_SECRET_KEY\", \"16_BYTE_SYMMETRIC_KEY\");\n    System.setProperty(\"INIT_VECTOR\", \"16_BYTE_INIT_VECTOR\");\n\n3b) alternatively define the above properties as unix environment variables on the shell before starting the Java process that contains the client code.\n\n4) Create a cipher by using the Facade class in either package like so:\n\n    SimpleCipher cipher = new CipherFacade();\n\n    String encrypted = cipher.encrypt(\"Hello World\");\n    String decrypted = cipher.decrypt(encrypted);\n\n\nKnown Issues\n------------\n\nCryptoutils was tested on Oracle JDK8+ with the built-in JCE provider. Other environments may vary\n\n\nLicense\n-------\n\nCryptoutils uses the Apache license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonmittag%2Fcryptoutils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonmittag%2Fcryptoutils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonmittag%2Fcryptoutils/lists"}