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

pub struct Salt(_);

A salt for HKDF operations.

Methods

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<'_> From<Okm<'_, Algorithm>> for Salt[src]

impl Debug for Salt[src]

Auto Trait Implementations

impl Send for Salt

impl Sync for Salt

Blanket Implementations

impl<T> From<T> for 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> Into<U> for T where
    U: From<T>, 
[src]

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.

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

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

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