Trait sasl::mechanisms::ScramProvider
[−]
[src]
pub trait ScramProvider { fn name() -> &'static str; fn hash(data: &[u8]) -> Vec<u8>; fn hmac(data: &[u8], key: &[u8]) -> Vec<u8>; fn derive(data: &[u8], salt: &[u8], iterations: usize) -> Vec<u8>; }
A trait which defines the needed methods for SCRAM.
Required Methods
fn name() -> &'static str
The name of the hash function.
fn hash(data: &[u8]) -> Vec<u8>
A function which hashes the data using the hash function.
fn hmac(data: &[u8], key: &[u8]) -> Vec<u8>
A function which performs an HMAC using the hash function.
fn derive(data: &[u8], salt: &[u8], iterations: usize) -> Vec<u8>
A function which does PBKDF2 key derivation using the hash function.