Struct ring::hkdf::Salt[][src]

pub struct Salt(_);

A salt for HKDF operations.

Implementations

impl Salt[src]

pub fn new(algorithm: Algorithm, value: &[u8]) -> Self[src]

Constructs a new Salt with the given value based on the given digest algorithm.

Constructing a Salt is relatively expensive so it is good to reuse a Salt object instead of re-constructing Salts with the same value.

pub fn extract(&self, secret: &[u8]) -> Prk[src]

The HKDF-Extract operation.

pub fn algorithm(&self) -> Algorithm[src]

The algorithm used to derive this salt.

Trait Implementations

impl Debug for Salt[src]

impl From<Okm<'_, Algorithm>> for Salt[src]

Auto Trait Implementations

impl RefUnwindSafe for Salt

impl Send for Salt

impl Sync for Salt

impl Unpin for Salt

impl UnwindSafe for Salt

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.