Struct ring::hkdf::Okm[][src]

pub struct Okm<'a, L: KeyType> { /* fields omitted */ }
Expand description

An HKDF OKM (Output Keying Material)

Intentionally not Clone or Copy as an OKM is generally only safe to use once.

Implementations

impl<L: KeyType> Okm<'_, L>[src]

pub fn len(&self) -> &L[src]

The OkmLength given to Prk::expand().

pub fn fill(self, out: &mut [u8]) -> Result<(), Unspecified>[src]

Fills out with the output of the HKDF-Expand operation for the given inputs.

Fails if (and only if) the requested output length is larger than 255 times the size of the digest algorithm’s output. (This is the limit imposed by the HKDF specification due to the way HKDF’s counter is constructed.)

Trait Implementations

impl<'a, L: Debug + KeyType> Debug for Okm<'a, L>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl From<Okm<'_, &'static Algorithm>> for UnboundKey[src]

fn from(okm: Okm<'_, &'static Algorithm>) -> Self[src]

Performs the conversion.

impl From<Okm<'_, &'static Algorithm>> for HeaderProtectionKey[src]

fn from(okm: Okm<'_, &'static Algorithm>) -> Self[src]

Performs the conversion.

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

fn from(okm: Okm<'_, Algorithm>) -> Self[src]

Performs the conversion.

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

fn from(okm: Okm<'_, Algorithm>) -> Self[src]

Performs the conversion.

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

fn from(okm: Okm<'_, Algorithm>) -> Self[src]

Performs the conversion.

Auto Trait Implementations

impl<'a, L> Send for Okm<'a, L> where
    L: Send

impl<'a, L> Sync for Okm<'a, L> where
    L: Sync

impl<'a, L> Unpin for Okm<'a, L> where
    L: Unpin

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

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

Performs the conversion.

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.

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

Performs the conversion.