[][src]Trait ffsend_api::pipe::crypto::prelude::Crypt

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

Pipe specialisation trait for cryptographic pipes.

Provided methods

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).

Loading content...

Implementors

impl Crypt for EceCrypt[src]

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

impl Crypt for GcmCrypt[src]

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

Loading content...