{"id":13532356,"url":"https://github.com/RustCrypto/password-hashes","last_synced_at":"2025-04-01T20:31:47.822Z","repository":{"id":37456563,"uuid":"100466775","full_name":"RustCrypto/password-hashes","owner":"RustCrypto","description":"Password hashing functions / KDFs","archived":false,"fork":false,"pushed_at":"2025-03-18T09:21:46.000Z","size":829,"stargazers_count":724,"open_issues_count":14,"forks_count":90,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-31T13:09:45.617Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RustCrypto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-16T08:31:50.000Z","updated_at":"2025-03-28T18:23:43.000Z","dependencies_parsed_at":"2023-02-08T08:31:25.099Z","dependency_job_id":"1546bffb-fb5b-45d4-9dae-5ef547a47eaf","html_url":"https://github.com/RustCrypto/password-hashes","commit_stats":{"total_commits":432,"total_committers":52,"mean_commits":8.307692307692308,"dds":0.5208333333333333,"last_synced_commit":"f43ac3025e6a273d58f84d4d6747be277b29ccb1"},"previous_names":[],"tags_count":112,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RustCrypto%2Fpassword-hashes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RustCrypto%2Fpassword-hashes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RustCrypto%2Fpassword-hashes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RustCrypto%2Fpassword-hashes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RustCrypto","download_url":"https://codeload.github.com/RustCrypto/password-hashes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246598925,"owners_count":20803111,"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":[],"created_at":"2024-08-01T07:01:10.361Z","updated_at":"2025-04-01T20:31:47.814Z","avatar_url":"https://github.com/RustCrypto.png","language":"Rust","readme":"# RustCrypto: Password Hashes\n\n[![Project Chat][chat-image]][chat-link]\n![Apache2/MIT licensed][license-image]\n[![Dependency Status][deps-image]][deps-link]\n\nCollection of password hashing algorithms, otherwise known as password-based key derivation functions, written in pure Rust.\n\n## Supported Algorithms\n\n| Algorithm      | Crate            | Crates.io                                                                                              | Documentation | MSRV                    |\n|----------------|------------------|--------------------------------------------------------------------------------------------------------|---------------|-------------------------|\n| [Argon2]       | [`argon2`]       | [![crates.io](https://img.shields.io/crates/v/argon2.svg)](https://crates.io/crates/argon2)            | [![Documentation](https://docs.rs/argon2/badge.svg)](https://docs.rs/argon2) | ![MSRV 1.81][msrv-1.81] |\n| [Balloon]      | [`balloon‑hash`] | [![crates.io](https://img.shields.io/crates/v/balloon-hash.svg)](https://crates.io/crates/balloon-hash) | [![Documentation](https://docs.rs/balloon-hash/badge.svg)](https://docs.rs/balloon-hash) | ![MSRV 1.81][msrv-1.81] |\n| [bcrypt‑pbkdf] | [`bcrypt‑pbkdf`] | [![crates.io](https://img.shields.io/crates/v/bcrypt-pbkdf.svg)](https://crates.io/crates/bcrypt-pbkdf) | [![Documentation](https://docs.rs/bcrypt-pbkdf/badge.svg)](https://docs.rs/bcrypt-pbkdf) | ![MSRV 1.81][msrv-1.81] |\n| [PBKDF2]       | [`pbkdf2`]       | [![crates.io](https://img.shields.io/crates/v/pbkdf2.svg)](https://crates.io/crates/pbkdf2)            | [![Documentation](https://docs.rs/pbkdf2/badge.svg)](https://docs.rs/pbkdf2) | ![MSRV 1.81][msrv-1.81] |\n| [scrypt]       | [`scrypt`]       | [![crates.io](https://img.shields.io/crates/v/scrypt.svg)](https://crates.io/crates/scrypt)            | [![Documentation](https://docs.rs/scrypt/badge.svg)](https://docs.rs/scrypt) | ![MSRV 1.81][msrv-1.81] |\n| [SHA-crypt]    | [`sha‑crypt`]    | [![crates.io](https://img.shields.io/crates/v/sha-crypt.svg)](https://crates.io/crates/sha-crypt)      | [![Documentation](https://docs.rs/sha-crypt/badge.svg)](https://docs.rs/sha-crypt) | ![MSRV 1.81][msrv-1.81] |\n\nPlease see the [OWASP Password Storage Cheat Sheet] for assistance in selecting an appropriate algorithm for your use case.\n\n## Usage\n\nThe following code example shows how to verify a password when stored using one\nof many possible password hashing algorithms implemented in this repository.\n\n```rust\nuse password_hash::{PasswordHash, PasswordVerifier};\n\nuse argon2::Argon2;\nuse pbkdf2::Pbkdf2;\nuse scrypt::Scrypt;\n\n// Can be: `$argon2`, `$pbkdf2`, or `$scrypt`\nlet hash_string = \"$argon2i$v=19$m=65536,t=1,p=1$c29tZXNhbHQAAAAAAAAAAA$+r0d29hqEB0yasKr55ZgICsQGSkl0v0kgwhd+U3wyRo\";\nlet input_password = \"password\";\n\nlet password_hash = PasswordHash::new(\u0026hash_string).expect(\"invalid password hash\");\n\n// Trait objects for algorithms to support\nlet algs: \u0026[\u0026dyn PasswordVerifier] = \u0026[\u0026Argon2::default(), \u0026Pbkdf2, \u0026Scrypt];\n\npassword_hash.verify_password(algs, input_password).expect(\"invalid password\");\n```\n\n## Minimum Supported Rust Version (MSRV) Policy\n\nMSRV bumps are considered breaking changes and will be performed only with minor version bump.\n\n## License\n\nAll crates licensed under either of\n\n * [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n * [MIT license](http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n\n[//]: # (badges)\n\n[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg\n[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260046-password-hashes\n[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg\n[deps-image]: https://deps.rs/repo/github/RustCrypto/password-hashes/status.svg\n[deps-link]: https://deps.rs/repo/github/RustCrypto/password-hashes\n[msrv-1.81]: https://img.shields.io/badge/rustc-1.81.0+-blue.svg\n\n[//]: # (crates)\n\n[`argon2`]: ./argon2\n[`balloon‑hash`]: ./balloon-hash\n[`bcrypt‑pbkdf`]: ./bcrypt-pbkdf\n[`pbkdf2`]: ./pbkdf2\n[`scrypt`]: ./scrypt\n[`sha‑crypt`]: ./sha-crypt\n\n[//]: # (general links)\n\n[Argon2]: https://en.wikipedia.org/wiki/Argon2\n[Balloon]: https://en.wikipedia.org/wiki/Balloon_hashing\n[bcrypt‑pbkdf]: https://flak.tedunangst.com/post/bcrypt-pbkdf\n[PBKDF2]: https://en.wikipedia.org/wiki/PBKDF2\n[scrypt]: https://en.wikipedia.org/wiki/Scrypt\n[SHA-crypt]: https://www.akkadia.org/drepper/SHA-crypt.txt\n[OWASP Password Storage Cheat Sheet]: https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html\n","funding_links":[],"categories":["Cryptography","Rust","Frameworks and Libs"],"sub_categories":["Others","Rust"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRustCrypto%2Fpassword-hashes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRustCrypto%2Fpassword-hashes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRustCrypto%2Fpassword-hashes/lists"}