Trait Crypt

Source
pub trait Crypt: Pipe {
    // Provided method
    fn crypt(&mut self, input: &[u8]) -> (usize, Option<Vec<u8>>) { ... }
}
Expand description

Pipe specialisation trait for cryptographic pipes.

Provided Methods§

Source

fn crypt(&mut self, input: &[u8]) -> (usize, Option<Vec<u8>>)

Encrypt/decrypt bytes from input, return the result.

Read bytes from the given input buffer, transform it using the configured cryptography and return transformed data when available.

This returns a tuple with the number of bytes read from the input, along with transformed data if available in the following format: (read_bytes, transformed_data).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§