[][src]Trait pwbox::UnauthenticatedCipher

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

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

Symmetric cipher without built-in authentication.

Associated Constants

const KEY_LEN: usize

Byte size of a key for this cipher.

const NONCE_LEN: usize

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

Loading content...

Required methods

fn seal_or_open(message: &mut [u8], nonce: &[u8], key: &[u8])

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.

Loading content...

Implementors

impl UnauthenticatedCipher for Aes128Ctr[src]

Loading content...