Trait djangohashers::Hasher
[−]
[src]
pub trait Hasher { fn verify(&self, password: &str, encoded: &str) -> Result<bool, HasherError>; fn encode(&self, password: &str, salt: &str, iterations: u32) -> String; }
Hasher abstraction, providing methods to encode and verify hashes.
Required Methods
fn verify(&self, password: &str, encoded: &str) -> Result<bool, HasherError>
Verifies a password against an encoded hash.
fn encode(&self, password: &str, salt: &str, iterations: u32) -> String
Generates an encoded hash for a given password and salt.
Implementors
impl Hasher for PBKDF2Hasher
impl Hasher for PBKDF2SHA1Hasher
impl Hasher for Argon2Hasher
impl Hasher for BCryptSHA256Hasher
impl Hasher for BCryptHasher
impl Hasher for SHA1Hasher
impl Hasher for MD5Hasher
impl Hasher for UnsaltedSHA1Hasher
impl Hasher for UnsaltedMD5Hasher
impl Hasher for CryptHasher