[][src]Struct pgp::types::StringToKey

pub struct StringToKey { /* fields omitted */ }

Methods

impl StringToKey[src]

pub fn new_default<R: CryptoRng + Rng>(rng: &mut R) -> Self[src]

pub fn new_iterated<R: CryptoRng + Rng>(
    rng: &mut R,
    hash: HashAlgorithm,
    count: u8
) -> Self
[src]

impl StringToKey[src]

pub fn count(&self) -> Option<usize>[src]

Converts a coded count into the count. Ref: https://tools.ietf.org/html/rfc4880#section-3.7.1.3

pub fn salt(&self) -> Option<&[u8]>[src]

pub fn hash(&self) -> HashAlgorithm[src]

pub fn typ(&self) -> StringToKeyType[src]

pub fn derive_key(&self, passphrase: &str, key_size: usize) -> Result<Vec<u8>>[src]

String-To-Key methods are used to convert a given password string into a key. Ref: https://tools.ietf.org/html/rfc4880#section-3.7

Trait Implementations

impl Serialize for StringToKey[src]

impl Clone for StringToKey[src]

impl Eq for StringToKey[src]

impl PartialEq<StringToKey> for StringToKey[src]

impl Debug for StringToKey[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Err = <U as TryFrom<T>>::Err