Available on crate feature
nightly
only.Expand description
Protected memory type aliases for PwHash
This mod provides re-exports of type aliases for protected memory usage
with PwHash
. These type aliases are provided for
convenience.
Example
use dryoc::pwhash::protected::*;
use dryoc::pwhash::{Config, PwHash};
let password = HeapBytes::from_slice_into_locked(
b"The robb'd that smiles, steals something from the thief.",
)
.expect("couldn't lock password");
let pwhash: LockedPwHash =
PwHash::hash(&password, Config::interactive()).expect("unable to hash");
pwhash.verify(&password).expect("verification failed");
pwhash
.verify(b"invalid password")
.expect_err("verification should have failed");