Struct ScramSha1RustNative

Source
pub struct ScramSha1RustNative;
Expand description

All hashing code dedicated for SHA1. Both rust native and ring inplemetations. A ScramProvider which provides SCRAM-SHA-1 and SCRAM-SHA-1-PLUS based on the PBKDF2, Sha, Hmac

Trait Implementations§

Source§

impl ScramHashing for ScramSha1RustNative

Source§

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

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

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

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

fn derive( password: &[u8], salt: &[u8], iterations: NonZeroU32, ) -> ScramResult<Vec<u8>>

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

impl ScramOps for ScramSha1RustNative

Source§

fn xor_arrays(a: &[u8], b: &[u8]) -> ScramResult<Vec<u8>>

A function which performs the XOR of two arrays

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.