{"id":34324846,"url":"https://github.com/t3hnar/scala-bcrypt","last_synced_at":"2025-12-17T15:59:00.010Z","repository":{"id":1951585,"uuid":"2881560","full_name":"t3hnar/scala-bcrypt","owner":"t3hnar","description":"Scala wrapper for jBcrypt + pom.xml inside","archived":false,"fork":false,"pushed_at":"2023-12-12T10:41:59.000Z","size":105,"stargazers_count":152,"open_issues_count":2,"forks_count":29,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-06-07T23:53:07.714Z","etag":null,"topics":["bcrypt","scala"],"latest_commit_sha":null,"homepage":"","language":"Scala","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/t3hnar.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":"2011-11-30T08:16:11.000Z","updated_at":"2024-10-21T23:17:38.000Z","dependencies_parsed_at":"2022-08-26T22:31:25.814Z","dependency_job_id":null,"html_url":"https://github.com/t3hnar/scala-bcrypt","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/t3hnar/scala-bcrypt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3hnar%2Fscala-bcrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3hnar%2Fscala-bcrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3hnar%2Fscala-bcrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3hnar%2Fscala-bcrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t3hnar","download_url":"https://codeload.github.com/t3hnar/scala-bcrypt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3hnar%2Fscala-bcrypt/sbom","scorecard":{"id":864784,"data":{"date":"2025-08-11","repo":{"name":"github.com/t3hnar/scala-bcrypt","commit":"428816969d6d9e22ca626e2858be57249f13d45c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":3,"reason":"Found 6/17 approved changesets -- score normalized to 3","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":"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":"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":"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":"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":"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":"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":"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":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 19 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T02:23:06.513Z","repository_id":1951585,"created_at":"2025-08-24T02:23:06.514Z","updated_at":"2025-08-24T02:23:06.514Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27784503,"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-12-17T02:00:08.291Z","response_time":55,"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":["bcrypt","scala"],"created_at":"2025-12-17T15:58:59.404Z","updated_at":"2025-12-17T15:59:00.004Z","avatar_url":"https://github.com/t3hnar.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scala Bcrypt [![Build Status](https://secure.travis-ci.org/t3hnar/scala-bcrypt.svg)](http://travis-ci.org/t3hnar/scala-bcrypt) [![Coverage Status](https://coveralls.io/repos/t3hnar/scala-bcrypt/badge.svg)](https://coveralls.io/r/t3hnar/scala-bcrypt) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/8e0fb26d880446428fd94b7e051e9cb0)](https://www.codacy.com/app/evolution-gaming/scala-bcrypt?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=t3hnar/scala-bcrypt\u0026amp;utm_campaign=Badge_Grade) [![Version](https://img.shields.io/maven-central/v/com.github.t3hnar/scala-bcrypt_2.11.svg?label=version)](http://search.maven.org/#search%7Cga%7C1%7Cg%3Acom.github.t3hnar%20AND%20scala-bcrypt)\n\nScala Bcrypt is a scala friendly wrapper of [jBCRYPT](http://www.mindrot.org/projects/jBCrypt/)\n\n## Examples\n\n### Safe APIs\nThe safe APIs will result in `scala.util.Failure`s and `scala.util.Success`s when executing operations to explicitly \nindicate the possibility that certain bcrypt operations can fail due to providing incorrect salt versions or number of \nrounds (eg. \u003e 30 rounds). \n\n#### Encrypt password\n\n```scala\n    scala\u003e  import com.github.t3hnar.bcrypt._\n    import com.github.t3hnar.bcrypt._\n\n    scala\u003e  \"password\".bcryptSafeBounded\n    res1: Try[String] = Success($2a$10$iXIfki6AefgcUsPqR.niQ.FvIK8vdcfup09YmUxmzS/sQeuI3QOFG)\n```\n\n#### Validate password\n\n```scala\n    scala\u003e  \"password\".isBcryptedSafeBounded(\"$2a$10$iXIfki6AefgcUsPqR.niQ.FvIK8vdcfup09YmUxmzS/sQeuI3QOFG\")\n    res2: Try[Boolean] = Success(true)\n```\n\n#### Composition\nSince `Try` is monadic, you can use a for-comprehension to compose operations that return `Success` or `Failure` with\nfail-fast semantics. You can also use the desugared notation (`flatMap`s and `map`s) if you prefer.\n```scala\n    scala\u003e  val bcryptAndVerify = for {\n      bcrypted \u003c- \"hello\".bcryptBounded(12)\n      result \u003c- \"hello\".isBcryptedSafeBounded(bcrypted)\n    } yield result\n    res: Try[Boolean] = Success(true)\n```\n\n#### Advanced usage\n\nBy default, the `salt` generated internally, and developer does not need to generate and store salt.\nBut if you decide that you need to manage salt, you can use `bcrypt` in the following way:\n\n```scala\n    scala\u003e  val salt = generateSalt\n    salt: String = $2a$10$8K1p/a0dL1LXMIgoEDFrwO\n\n    scala\u003e  \"password\".bcryptBounded(salt)\n    res3: Try[String] = Success($2a$10$8K1p/a0dL1LXMIgoEDFrwOfMQbLgtnOoKsWc.6U6H0llP3puzeeEu)\n```\n\n### Unsafe APIs\nThe Unsafe APIs will result in Exceptions being thrown when executing operations as certain bcrypt operations can fail \ndue to providing incorrect salt versions or number of rounds (eg. \u003e 30 rounds or password longer than 71 bytes). These Unsafe APIs are present for \nbackwards compatibility reasons and should be avoided if possible.\n\n#### Encrypt password\n\n```scala\n    scala\u003e  import com.github.t3hnar.bcrypt._\n    import com.github.t3hnar.bcrypt._\n\n    scala\u003e  \"password\".bcryptBounded\n    res1: String = $2a$10$iXIfki6AefgcUsPqR.niQ.FvIK8vdcfup09YmUxmzS/sQeuI3QOFG\n```\n\n#### Validate password\n\n```scala\n    scala\u003e  \"password\".isBcryptedBounded(\"$2a$10$iXIfki6AefgcUsPqR.niQ.FvIK8vdcfup09YmUxmzS/sQeuI3QOFG\")\n    res2: Boolean = true\n```\n\n#### Advanced usage\n\n```scala\n    scala\u003e  val salt = generateSalt\n    salt: String = $2a$10$8K1p/a0dL1LXMIgoEDFrwO\n\n    scala\u003e  \"password\".bcryptBounded(salt)\n    res3: String = $2a$10$8K1p/a0dL1LXMIgoEDFrwOfMQbLgtnOoKsWc.6U6H0llP3puzeeEu\n```\n\n## Setup\n\n#### SBT\n```scala\nlibraryDependencies += \"com.github.t3hnar\" %% \"scala-bcrypt\" % \"4.3.1\"\n```\n\n#### Maven\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.t3hnar\u003c/groupId\u003e\n    \u003cartifactId\u003escala-bcrypt_2.13\u003c/artifactId\u003e\n    \u003cversion\u003e4.3.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft3hnar%2Fscala-bcrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft3hnar%2Fscala-bcrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft3hnar%2Fscala-bcrypt/lists"}