{"id":14977578,"url":"https://github.com/transempiric/simple-encryptor","last_synced_at":"2025-08-23T18:04:34.256Z","repository":{"id":57729139,"uuid":"122644289","full_name":"TransEmpiric/simple-encryptor","owner":"TransEmpiric","description":"Simple property ecryptor/decryptor extension for Spring Framework (RSA Public and Private PEM keys and the like).","archived":false,"fork":false,"pushed_at":"2018-02-26T19:46:04.000Z","size":15,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-08T15:48:50.539Z","etag":null,"topics":["encryption-support","encryptor","rsa","rsa-cryptography","rsa-encryption","rsa-key","rsa-key-encryption","spring","spring-boot","spring-cloud","spring-framework","spring-security","spring-security-rsa","springframework"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TransEmpiric.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}},"created_at":"2018-02-23T16:18:36.000Z","updated_at":"2019-02-01T06:47:41.000Z","dependencies_parsed_at":"2022-09-10T23:41:37.967Z","dependency_job_id":null,"html_url":"https://github.com/TransEmpiric/simple-encryptor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TransEmpiric/simple-encryptor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TransEmpiric%2Fsimple-encryptor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TransEmpiric%2Fsimple-encryptor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TransEmpiric%2Fsimple-encryptor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TransEmpiric%2Fsimple-encryptor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TransEmpiric","download_url":"https://codeload.github.com/TransEmpiric/simple-encryptor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TransEmpiric%2Fsimple-encryptor/sbom","scorecard":{"id":143468,"data":{"date":"2025-08-11","repo":{"name":"github.com/TransEmpiric/simple-encryptor","commit":"c0f7bd93294aa898f24c2abfecb15bd367e2225b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/4 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-16T08:47:00.132Z","repository_id":57729139,"created_at":"2025-08-16T08:47:00.133Z","updated_at":"2025-08-16T08:47:00.133Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271760492,"owners_count":24816430,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["encryption-support","encryptor","rsa","rsa-cryptography","rsa-encryption","rsa-key","rsa-key-encryption","spring","spring-boot","spring-cloud","spring-framework","spring-security","spring-security-rsa","springframework"],"created_at":"2024-09-24T13:55:56.433Z","updated_at":"2025-08-23T18:04:34.231Z","avatar_url":"https://github.com/TransEmpiric.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simple-encryptor\nSpring Framework encryption extension.\nSimpleEncryptor supports property encryption via TextEncryptor, with optional use of [spring-security-rsa](https://github.com/dsyer/spring-security-rsa) RSA (PUBLIC and PRIVATE keys).\nRSA (PUBLIC and PRIVATE keys) can be deleted or cleared after TextEncryptor instantiation using the SimpleEncryptorFactoryBean.\n\nSimpleEncryptor provides encryption support for property sources in Spring Boot Applications and plain old Spring.\u003cbr/\u003e\n\n## How to get use.\n1.  Add the simple-encryptor dependency to your project (Maven Central):\n\t```groovy\n\t compile(\"com.transempiric:simple-encryptor:1.0.0\")\n\t```\n\t```xml\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.transempiric\u003c/groupId\u003e\n      \u003cartifactId\u003esimple-encryptor\u003c/artifactId\u003e\n      \u003cversion\u003e1.0.0\u003c/version\u003e\n      \u003cscope\u003ecompile\u003c/scope\u003e\n    \u003c/dependency\u003e\n    ```\n2.  Spring Boot property example:\n\t```java\n    @SpringBootApplication\n    public class WebTemplateApplication {\n        public static void main(String[] args) throws Exception {\n    \n            TextEncryptor rsaDecryptor = new SimpleEncryptorFactoryBean()\n                    .rsaDecryptor(\"classPath:local_enc_private_key.pem\")\n                    .createInstance();\n            \n            //TODO: Clean up and make use of the SimpleEncryptorFactoryBean.\n            SimpleEncryptorPropertyResolver resolver =  new SimpleEncryptorPropertyResolver(rsaDecryptor);\n            SimpleEncryptorEnvironment env =  new SimpleEncryptorEnvironment(SimpleEncryptorInterceptionMode.WRAPPER, resolver);\n            \n            new SpringApplicationBuilder()\n                    .environment(env)\n                    .sources(WebTemplateApplication.class)\n                    .run(args);\n    \n        }\n    }\n\t```\n\t\n    Encryptable properties will be enabled across the entire Spring Environment (This means any system property, environment property, command line argument, application.properties, yaml properties, and any other custom property sources can contain encrypted properties)\n\n2.  Spring Bean example for encryptors:\n\t```java\n    import com.transempiric.simpleEncryptor.SimpleEncryptorFactoryBean;\n    import org.springframework.context.annotation.Bean;\n    import org.springframework.context.annotation.Configuration;\n    import org.springframework.security.crypto.encrypt.TextEncryptor;\n    \n    import static com.transempiric.simpleEncryptor.SimpleEncryptorFactoryBean.SIMPLE_ENCRYPTOR_SALT_PROPERTY_NAME;\n    import static com.transempiric.simpleEncryptor.SimpleEncryptorFactoryBean.SIMPLE_ENCRYPTOR_SECRET_PROPERTY_NAME;\n    \n    @Configuration\n    public class SimpleEncryptorConfigExample {\n    \n        @Bean\n        public TextEncryptor rsaSimpleEncryptor() throws Exception {\n            return new SimpleEncryptorFactoryBean()\n                    .rsaEncryptor(\"classPath:local_enc_public_key.pem\")\n                    // .clearKeyFileContents(false)\n                    // .deleteKeyFiles(false)\n                    .createInstance();\n        }\n    \n        @Bean\n        public TextEncryptor rsaSimpleDecryptor() throws Exception {\n            return new SimpleEncryptorFactoryBean()\n                    .rsaDecryptor(\"classPath:local_enc_private_key.pem\")\n                    // .clearKeyFileContents(true)\n                    // .deleteKeyFiles(true)\n                    .createInstance();\n        }\n    \n        // Required (Hex-encoded string): Inject System property -Dsimple.encryptor.secret=497349744150726F626C656D466F72596F75546F41736B\n        // Optional (Hex-encoded string): Inject System property -Dsimple.encryptor.salt=456E63727970746F7273\n        @Bean\n            public TextEncryptor hexEncodingSimpleEncryptor() throws Exception {\n                return new SimpleEncryptorFactoryBean()\n                                .hexEncodingTextEncryptor(\n                                        System.getProperty(SIMPLE_ENCRYPTOR_SECRET_PROPERTY_NAME),\n                                        System.getProperty(SIMPLE_ENCRYPTOR_SALT_PROPERTY_NAME)\n                                )\n                                .createInstance();\n            }\n    \n        @Bean\n        public String spaceMonkey(\n                TextEncryptor hexEncodingSimpleEncryptor,\n                TextEncryptor rsaSimpleEncryptor,\n                TextEncryptor rsaSimpleDecryptor\n        ) {\n            /*\n            \n            System.out.println(\"**************** SimpleEncryptorConfigExample Test *************************\");\n            System.out.println(rsaSimpleEncryptor.encrypt(\"rupertDurden\"));\n            System.out.println(rsaSimpleEncryptor.encrypt(\"rupertDurden\"));\n    \n            System.out.println(rsaSimpleDecryptor.decrypt(rsaSimpleEncryptor.encrypt(\"rupert\")));\n            System.out.println(rsaSimpleDecryptor.decrypt(rsaSimpleEncryptor.encrypt(\"durden\")));\n    \n            System.out.println(hexEncodingSimpleEncryptor.encrypt(\"rupert\"));\n            System.out.println(hexEncodingSimpleEncryptor.encrypt(\"durden\"));\n    \n            System.out.println(hexEncodingSimpleEncryptor.decrypt(hexEncodingSimpleEncryptor.encrypt(\"rupert\")));\n            System.out.println(hexEncodingSimpleEncryptor.decrypt(hexEncodingSimpleEncryptor.encrypt(\"durden\")));\n    \n            System.out.println(\"**************** SimpleEncryptorConfigExample Test *************************\");\n    \n            */\n    \n            return \"SpaceMonkey\";\n        }\n    }\n\t```\n\t\n## Major Props to some Spring peeps\n[Dave Syer](https://github.com/dsyer/spring-security-rsa) for [spring-security-rsa](https://github.com/dsyer/spring-security-rsa) and [spring-cloud-config](https://github.com/spring-cloud/spring-cloud-config).\n\u003cbr/\u003e\n[Ulises Bocchio](https://github.com/ulisesbocchio) for [jasypt-spring-boot](https://github.com/ulisesbocchio/jasypt-spring-boot).\n\t","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransempiric%2Fsimple-encryptor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftransempiric%2Fsimple-encryptor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransempiric%2Fsimple-encryptor/lists"}