[][src]Struct radicle_keystore::crypto::Pwhash

pub struct Pwhash<P> { /* fields omitted */ }

A Crypto implementation based on libsodium's "secretbox".

While historically based on libsodium, the underlying implementation is now based on the chacha20poly1305 crate. The encryption key is derived from a passphrase using scrypt.

The resulting SecretBox stores the ciphertext alongside cleartext salt and nonce values.

Implementations

impl<P> Pwhash<P>[src]

pub fn new(pinentry: P, params: KdfParams) -> Self[src]

Create a new Pwhash value

Trait Implementations

impl<P: Clone> Clone for Pwhash<P>[src]

impl<P> Crypto for Pwhash<P> where
    P: Pinentry,
    P::Error: Error + 'static, 
[src]

type SecretBox = SecretBox

type Error = SecretBoxError<P::Error>

Auto Trait Implementations

impl<P> RefUnwindSafe for Pwhash<P> where
    P: RefUnwindSafe

impl<P> Send for Pwhash<P> where
    P: Send

impl<P> Sync for Pwhash<P> where
    P: Sync

impl<P> Unpin for Pwhash<P> where
    P: Unpin

impl<P> UnwindSafe for Pwhash<P> where
    P: UnwindSafe

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