Function crypt4gh::reencrypt [−][src]
pub fn reencrypt<R: Read, W: Write>(
keys: &[Keys],
recipient_keys: &HashSet<Keys>,
read_buffer: &mut R,
write_buffer: &mut W,
trim: bool
) -> Result<(), Crypt4GHError>
Expand description
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.