Skip to main content

hash_many

Function hash_many 

Source
pub fn hash_many(passwords: &[&[u8]], cost: u32) -> BcryptResult<Vec<String>>
Expand description

Batch-hash passwords at one cost with fresh random salts, returning the 60-byte $2b$ hash strings in input order.

One salt per password is drawn from the OS CSPRNG up front (hence std), then the batch runs through the SIMD path.

ยงErrors

CostNotAllowed if cost is outside 4..=31; Rand if the OS entropy source fails.