[][src]Function crypt4gh::decrypt

pub fn decrypt<R: Read, W: Write>(
    keys: &[Keys],
    read_buffer: &mut R,
    write_buffer: &mut W,
    range_start: usize,
    range_span: Option<usize>,
    sender_pubkey: Option<Vec<u8>>
) -> Result<()>

Reads from the read_buffer and writes the decrypted data to write_buffer.

Reads from the read_buffer and writes the decrypted data to write_buffer. If the range is specified, it will only encrypt the bytes from range_start to range_start + range_span. In case that range_span is none, it will encrypt from range_start to the end of the input. If sender_pubkey is specified the program will check that the recipient_key in the message is the same as the sender_pubkey.