4 releases (2 breaking)

Uses old Rust 2015

0.3.1 Aug 16, 2018
0.3.0 Aug 16, 2018
0.2.0 Aug 16, 2018
0.1.0 Aug 16, 2018

#31 in #password-hashing

MIT/Apache

11KB

secure-password

crates.io version build status downloads docs.rs docs

Safe password hashing with thread-local storage. Rust adaptation of emilbayes/secure-password.

Security Disclaimer

⚠️ This package has not been audited for security by any third party. It uses rust-argon2 for the hash, and rand for the salt. Decide for yourself whether this package is appropriate for the security profile of your project. ⚠️

Installation

$ cargo add secure-password

Usage

extern crate secure_password;

let pass = b"hello world";
let hash = secure_password::hash(pass).unwrap();
let is_ok = secure_password::verify(pass, &hash).unwrap();
assert!(is_ok);

See Also

License

Apache-2.0

Dependencies

~1MB
~17K SLoC