[][src]Struct ffsend_api::pipe::crypto::ece::EceCrypt

pub struct EceCrypt { /* fields omitted */ }

Something that can encrypt or decrypt given data using ECE.

Methods

impl EceCrypt[src]

pub fn new(
    mode: CryptMode,
    len: usize,
    ikm: Vec<u8>,
    salt: Option<Vec<u8>>
) -> Self
[src]

Construct a new ECE crypter pipe.

It is highly recommended to use the encrypt() and decrypt() methods instead for constructing a new crypter.

The size in bytes of the plaintext data must be given as len. The input key material must be given as ikm. When encrypting, a salt must be specified.

pub fn encrypt(len: usize, ikm: Vec<u8>, salt: Option<Vec<u8>>) -> Self[src]

Create an ECE encryptor.

The size in bytes of the plaintext data that is encrypted decrypt must be given as len. The input key material must be given as ikm. The salt is optional and will be randomly generated if None.

pub fn decrypt(len: usize, ikm: Vec<u8>) -> Self[src]

Create an ECE decryptor.

The size in bytes of the plaintext data that is decrypted decrypt must be given as len. The input key material must be given as ikm.

Trait Implementations

impl Crypt for EceCrypt[src]

impl Pipe for EceCrypt[src]

type Reader = EceReader

The wrapping reader type used for this pipe.

type Writer = EceWriter

The wrapping writer type used for this pipe.

impl PipeRead<EceCrypt> for EceReader[src]

impl PipeWrite<EceCrypt> for EceWriter[src]

impl PipeLen for EceCrypt[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, 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> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

impl<T> Typeable for T where
    T: Any

impl<T> Same<T> for T

type Output = T

Should always be Self