{"id":18792108,"url":"https://github.com/sterlp/hash","last_synced_at":"2026-02-04T00:04:28.074Z","repository":{"id":57740863,"uuid":"305674079","full_name":"sterlp/hash","owner":"sterlp","description":"Common Lib to Hash passwords which is compatible to Java EE/ CDI (e.g. payara, wildfly) and Spring Boot.","archived":false,"fork":false,"pushed_at":"2024-12-28T14:36:32.000Z","size":68,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-19T21:00:18.227Z","etag":null,"topics":["bcrypt","cli","command-line-tool","hash","hash-passwords","hashing","jee","jee7","password","payara","pbkdf","pbkdf2","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sterlp.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,"zenodo":null}},"created_at":"2020-10-20T10:37:44.000Z","updated_at":"2024-12-28T14:37:57.000Z","dependencies_parsed_at":"2024-11-07T21:18:49.257Z","dependency_job_id":"a3d17634-39f6-4dae-81a0-1c11c1cf5ee7","html_url":"https://github.com/sterlp/hash","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sterlp/hash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sterlp%2Fhash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sterlp%2Fhash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sterlp%2Fhash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sterlp%2Fhash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sterlp","download_url":"https://codeload.github.com/sterlp/hash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sterlp%2Fhash/sbom","scorecard":{"id":851909,"data":{"date":"2025-08-11","repo":{"name":"github.com/sterlp/hash","commit":"e36acd78ff690b6eba65a516db3d24c232209992"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/19 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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:18","Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:17","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/maven.yml:1","Info: no jobLevel write permissions found"],"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/sterlp/hash/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/sterlp/hash/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/sterlp/hash/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/sterlp/hash/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/sterlp/hash/maven.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/sterlp/hash/maven.yml/main?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned"],"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":"SAST","score":10,"reason":"SAST tool detected: CodeQL","details":["Info: SAST configuration detected: CodeQL","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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: 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":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.1.1 not signed: https://api.github.com/repos/sterlp/hash/releases/33980123","Warn: release artifact v0.1.1 does not have provenance: https://api.github.com/repos/sterlp/hash/releases/33980123"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/maven.yml:10"],"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"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"}},{"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"}}]},"last_synced_at":"2025-08-23T22:45:36.037Z","repository_id":57740863,"created_at":"2025-08-23T22:45:36.038Z","updated_at":"2025-08-23T22:45:36.038Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29062485,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T23:14:54.203Z","status":"ssl_error","status_checked_at":"2026-02-03T23:14:50.873Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bcrypt","cli","command-line-tool","hash","hash-passwords","hashing","jee","jee7","password","payara","pbkdf","pbkdf2","spring-boot"],"created_at":"2024-11-07T21:18:23.899Z","updated_at":"2026-02-04T00:04:28.059Z","avatar_url":"https://github.com/sterlp.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Hash Lib CI](https://github.com/sterlp/hash/workflows/Hash%20Lib%20CI/badge.svg)\n[![CodeQL](https://github.com/sterlp/hash/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/sterlp/hash/actions/workflows/codeql-analysis.yml)\n\n# Hash Lib Cli\nTool to create BCrypt and PBKDF2 hashes of passwords directly in the command line:\n\n- Download latest version of **hash-cli** here: https://github.com/sterlp/hash/releases\n- [Maven Central](https://search.maven.org/search?q=org.sterl.hash)\n\n## Create a password hash\n### BCrpyt\n```\njava -jar hash-cli.jar mypassword\n\u003e $2a$10$m4hjjVjjGD36bgHlblJaweMDrGelSO1lx4osfpNi/7DN9ZvTzMqA6\n```\n\n### PBKDF2WithHmacSHA512\n```\njava -jar hash-cli.jar -a PBKDF2WithHmacSHA512 -p mypassword\n\u003e PBKDF2WithHmacSHA512:2048:ilIYz4CirlKeZfa59Tu9Dlruc69zaAxGyDb0OOcpppM=:HMv6yD8WUKSM2XY6jHIuzz9ShXX1wj120Njb0TptJ6hBBWAFnOdx0xR1hvz9ICtp91sdBxRaMyU8LsYZCIuP9g==\n```\n\n## Verify a password hash\n\n### BCrypt\n```\njava -jar hash-cli.jar -p foo -h \"$2a$10$At1ZDrj3taopwLzeZ237KekybhWlF6quEd8bv9eAIWrTVzvtKyTEi\"\n\u003e true\n```\n\n### PBKDF2WithHmacSHA512\n```\njava -jar hash-cli.jar -a PBKDF2WithHmacSHA512 -p mypassword -h PBKDF2WithHmacSHA512:2048:ilIYz4CirlKeZfa59Tu9Dlruc69zaAxGyDb0OOcpppM=:HMv6yD8WUKSM2XY6jHIuzz9ShXX1wj120Njb0TptJ6hBBWAFnOdx0xR1hvz9ICtp91sdBxRaMyU8LsYZCIuP9g==\n\u003e true\n```\n\n# hash-lib\n\nCommon lib which provides a common Hash algorithms for JEE and Spring Boot:\n\n- BCrypt\n- PBKDF2WithHmacSHA224\n- PBKDF2WithHmacSHA256\n- PBKDF2WithHmacSHA384\n- PBKDF2WithHmacSHA512\n\n## jee-hash-lib\n\nSupport BCrypt and PBKDF2 password hash and verification. As so be compatible with existing JEE JDBC user stores and\nSpring Boot user stores.\n\n## Usage\n```java\nimport javax.annotation.security.DeclareRoles;\nimport javax.enterprise.context.ApplicationScoped;\nimport javax.security.enterprise.authentication.mechanism.http.BasicAuthenticationMechanismDefinition;\nimport javax.security.enterprise.identitystore.DatabaseIdentityStoreDefinition;\nimport javax.ws.rs.ApplicationPath;\nimport javax.ws.rs.core.Application;\nimport org.sterl.jee.hash.BCryptAndPbkdf2PasswordHash;\n\n@ApplicationScoped\n@BasicAuthenticationMechanismDefinition(realmName = \"jee-basic\")\n@DeclareRoles({ \"admin\", \"user\" }) // this authorities are allowed\n@DatabaseIdentityStoreDefinition(\n    callerQuery = \"select password from users where enabled = true AND username = ?\",\n    groupsQuery = \"select authority from authorities where username = ?\",\n    dataSourceLookup = \"jdbc/identity-store\",\n    hashAlgorithm = BCryptAndPbkdf2PasswordHash.class,\n    hashAlgorithmParameters = {\n        \"Algorithm=PBKDF2WithHmacSHA512\"\n    }\n)\n@ApplicationPath(\"\")\npublic class ApplicationConfiguration extends Application {\n    \n}\n```\n## Maven import JEE\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.sterl.hash\u003c/groupId\u003e\n  \u003cartifactId\u003ejee-hash-lib\u003c/artifactId\u003e\n  \u003cversion\u003e0.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n# Base Lib\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.sterl.hash\u003c/groupId\u003e\n  \u003cartifactId\u003ehash-lib\u003c/artifactId\u003e\n  \u003cversion\u003e0.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n- Release: https://oss.sonatype.org/content/repositories/releases/org/sterl/hash/\n- Snapshot: https://oss.sonatype.org/content/repositories/snapshots/org/sterl/hash/\n\n## How to release\n\n- `mvn versions:set -DnewVersion=x.x.x-SNAPSHOT`\n- `mvn clean install -Prelease`\n- `mvn deploy`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsterlp%2Fhash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsterlp%2Fhash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsterlp%2Fhash/lists"}