[][src]Struct lastpass::DecryptionKey

pub struct DecryptionKey(_);

An AES-256 key for encrypting or decrypting things.

Methods

impl DecryptionKey[src]

pub const LEN: usize[src]

pub const fn from_raw(key: [u8; 32]) -> Self[src]

pub fn from_base64<S: AsRef<[u8]>>(key: S) -> Result<Self, DecodeError>[src]

pub fn from_hex<S: AsRef<[u8]>>(key: S) -> Result<Self, FromHexError>[src]

pub fn calculate(username: &str, password: &str, iterations: usize) -> Self[src]

pub fn decrypt(&self, ciphertext: &[u8]) -> Result<Vec<u8>, DecryptionError>[src]

pub fn decrypt_base64(
    &self,
    ciphertext: &str
) -> Result<Vec<u8>, DecryptionError>
[src]

Trait Implementations

impl AsRef<[u8]> for DecryptionKey[src]

impl Clone for DecryptionKey[src]

impl Copy for DecryptionKey[src]

impl Debug for DecryptionKey[src]

impl Deref for DecryptionKey[src]

type Target = [u8]

The resulting type after dereferencing.

impl FromStr for DecryptionKey[src]

type Err = DecodeError

The associated error which can be returned from parsing.

impl PartialEq<DecryptionKey> for DecryptionKey[src]

impl<T> PartialEq<T> for DecryptionKey where
    T: PartialEq<[u8]>, 
[src]

impl StructuralPartialEq for DecryptionKey[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[src]

type Output = T

Should always be Self

impl<T> ToHex for T where
    T: AsRef<[u8]>, 
[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.