[][src]Function crypt4gh::reencrypt

pub fn reencrypt<R: Read, W: Write>(
    keys: Vec<Keys>,
    recipient_keys: HashSet<Keys>,
    read_buffer: &mut R,
    write_buffer: &mut W,
    trim: bool
) -> Result<()>

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

Reads from the read_buffer and writes the reencrypted data to write_buffer. It will decrypt the message using the key in keys and then reencrypt it for the recipient keys specified in recipient_keys. If trim is true, it will discard the packages that cannot be decrypted.