[−][src]Struct ffsend_api::pipe::crypto::ece::EceCrypt
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]
mode: CryptMode,
len: usize,
ikm: Vec<u8>,
salt: Option<Vec<u8>>
) -> Self
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.
fn pipe(&mut self, input: &[u8]) -> (usize, Option<Vec<u8>>)[src]
fn reader(self, inner: Box<dyn Read>) -> Self::Reader[src]
fn writer(self, inner: Box<dyn Write>) -> Self::Writer[src]
fn pipe_transparent(&self, input: &[u8]) -> (usize, Option<Vec<u8>>)[src]
impl PipeRead<EceCrypt> for EceReader[src]
impl PipeWrite<EceCrypt> for EceWriter[src]
impl PipeLen for EceCrypt[src]
Auto Trait Implementations
impl Send for EceCrypt
impl Sync for EceCrypt
impl Unpin for EceCrypt
impl UnwindSafe for EceCrypt
impl RefUnwindSafe for EceCrypt
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> Same<T> for T
type Output = T
Should always be Self