Registry / crypto / bcrypt-pbkdf

bcrypt-pbkdf

JSON →
library0.11.0rscratesunverified

bcrypt-pbkdf password-based key derivation function, implementing the bcrypt PBKDF algorithm.

# Cargo.toml [dependencies] bcrypt-pbkdf = "0.11.0"
INSTALL
IMPORT
SIG · BCRYPT-PBKDF
B
bcrypt-pbkdf
cryptorustv0.11.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

bcrypt_pbkdf
use bcrypt_pbkdf::bcrypt_pbkdf;

Derives a key from a password and salt using bcrypt-pbkdf.

use bcrypt_pbkdf::bcrypt_pbkdf; fn main() { let password = b"password"; let salt = b"salt"; let mut output = [0u8; 32]; bcrypt_pbkdf(password, salt, 4, &mut output).unwrap(); println!("Derived key: {:?}", output); }
Debug
Known issues
gotchaThe number of rounds (cost factor) must be chosen carefully; too low is insecure, too high is slow.
fix
Use a cost factor of at least 4 (as in the example) and adjust based on performance requirements.
affects: >=0.0.0
Upgrade
Version history
0.11.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
34 hits · last 30 days
node
30
Resources