[][src]Struct pwbox::PwBoxBuilder

pub struct PwBoxBuilder<'a, K, C> { /* fields omitted */ }

Builder for PwBoxes.

Implementations

impl<'a, K, C> PwBoxBuilder<'a, K, C> where
    K: DeriveKey + Clone + Default,
    C: Cipher
[src]

pub fn new<R: RngCore + CryptoRng>(rng: &'a mut R) -> Self[src]

Initializes the builder with a random number generator.

pub fn kdf(&mut self, kdf: K) -> &mut Self[src]

Sets up a custom KDF.

pub fn seal(
    &mut self,
    password: impl AsRef<[u8]>,
    data: impl AsRef<[u8]>
) -> Result<PwBox<K, C>>
[src]

Creates a new PwBox with the specified password and contents.

Trait Implementations

impl<'a, K, C> Debug for PwBoxBuilder<'a, K, C>[src]

Auto Trait Implementations

impl<'a, K, C> !RefUnwindSafe for PwBoxBuilder<'a, K, C>

impl<'a, K, C> !Send for PwBoxBuilder<'a, K, C>

impl<'a, K, C> !Sync for PwBoxBuilder<'a, K, C>

impl<'a, K, C> Unpin for PwBoxBuilder<'a, K, C> where
    C: Unpin,
    K: Unpin

impl<'a, K, C> !UnwindSafe for PwBoxBuilder<'a, K, C>

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, 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.