[][src]Struct ciph::salsa::WrapKey

pub struct WrapKey { /* fields omitted */ }

A wrapped Key for convenience and to ensure bytes are erased when dropped.

Implementations

impl WrapKey[src]

pub fn key(&self) -> &Key[src]

impl WrapKey[src]

pub fn new(key: &Key) -> Self[src]

Build a wrapped key by cloning the provided key. It is up to the caller to properly dispose of the memory.

pub fn from_bytes_and_erase_source(bytes: &mut [u8; 32]) -> Self[src]

Convenience method. Build the key from the submitted array reference. Since the bytes are cloned, the source is zeroed to help prevent security breaches.

Trait Implementations

impl Clone for WrapKey[src]

impl Debug for WrapKey[src]

impl Drop for WrapKey[src]

impl Eq for WrapKey[src]

impl From<&'_ GenericArray<u8, <Salsa<R20> as NewStreamCipher>::KeySize>> for WrapKey[src]

impl FromStr for WrapKey[src]

Build a WrapKey from a base64 encoded string. Same precaution applies with the string data floating in memory after the key is built.

type Err = ParseKeyError

The associated error which can be returned from parsing.

impl PartialEq<WrapKey> for WrapKey[src]

impl StructuralEq for WrapKey[src]

impl StructuralPartialEq for WrapKey[src]

Auto Trait Implementations

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> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,