Struct sasl::common::scram::Sha1

source ·
pub struct Sha1;
Expand description

A ScramProvider which provides SCRAM-SHA-1 and SCRAM-SHA-1-PLUS

Trait Implementations§

source§

impl ScramProvider for Sha1

§

type Secret = Pbkdf2Sha1

The kind of secret this ScramProvider requires.
source§

fn name() -> &'static str

The name of the hash function.
source§

fn hash(data: &[u8]) -> Vec<u8>

A function which hashes the data using the hash function.
source§

fn hmac(data: &[u8], key: &[u8]) -> Result<Vec<u8>, InvalidLength>

A function which performs an HMAC using the hash function.
source§

fn derive( password: &Password, salt: &[u8], iterations: u32 ) -> Result<Vec<u8>, DeriveError>

A function which does PBKDF2 key derivation using the hash function.

Auto Trait Implementations§

§

impl RefUnwindSafe for Sha1

§

impl Send for Sha1

§

impl Sync for Sha1

§

impl Unpin for Sha1

§

impl UnwindSafe for Sha1

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.