pub trait UnauthenticatedCipher: 'static {
    const KEY_LEN: usize;
    const NONCE_LEN: usize;

    fn seal_or_open(message: &mut [u8], nonce: &[u8], key: &[u8]);
}
Expand description

Symmetric cipher without built-in authentication.

Associated Constants

Byte size of a key for this cipher.

Byte size of a nonce (aka initialization vector, IV) for this cipher.

Required methods

Encrypts or decrypts message in place, given the nonce and key.

Safety

When used within PwBox, nonce and key are guaranteed to have correct sizes.

Implementors