Function chacha20_poly1305_aead::encrypt_read [] [src]

pub fn encrypt_read<R: Read, W: Write>(
    key: &[u8],
    nonce: &[u8],
    aad: &[u8],
    input: &mut R,
    output: &mut W
) -> Result<[u8; 16]>

Encrypts bytes from a reader and returns the authentication tag.

This function is identical to the encrypt function, the only difference being that its input comes from a reader instead of a byte slice.