[][src]Trait crypto2::aeadcipher::AeadCipher

pub trait AeadCipher: Sized {
    pub const KEY_LEN: usize;
    pub const BLOCK_LEN: usize;
    pub const TAG_LEN: usize;
    pub const P_MAX: usize;
    pub const C_MAX: usize;
    pub const N_MIN: usize;
    pub const N_MAX: usize;
    pub const KIND: AeadCipherKind;

    pub fn aead_key_len() -> usize;
pub fn aead_block_len() -> usize;
pub fn aead_tag_len() -> usize;
pub fn aead_pmax() -> usize;
pub fn aead_cmax() -> usize;
pub fn aead_nmin() -> usize;
pub fn aead_nmax() -> usize;
pub fn aead_kind() -> AeadCipherKind;
pub fn aead_new(key: &[u8]) -> Self;
pub fn aead_encrypt_slice(
        &self,
        nonce: &[u8],
        aad: &[u8],
        aead_pkt: &mut [u8]
    );
pub fn aead_decrypt_slice(
        &self,
        nonce: &[u8],
        aad: &[u8],
        aead_pkt: &mut [u8]
    ) -> bool;
pub fn aead_encrypt_slice_detached(
        &self,
        nonce: &[u8],
        aad: &[u8],
        plaintext_in_ciphertext_out: &mut [u8],
        tag_out: &mut [u8]
    );
pub fn aead_decrypt_slice_detached(
        &self,
        nonce: &[u8],
        aad: &[u8],
        ciphertext_in_plaintext_out: &mut [u8],
        tag_in: &[u8]
    ) -> bool; }

Associated Constants

pub const KEY_LEN: usize

pub const BLOCK_LEN: usize

pub const TAG_LEN: usize

pub const P_MAX: usize

pub const C_MAX: usize

pub const N_MIN: usize

pub const N_MAX: usize

pub const KIND: AeadCipherKind

Loading content...

Required methods

pub fn aead_key_len() -> usize

pub fn aead_block_len() -> usize

pub fn aead_tag_len() -> usize

pub fn aead_pmax() -> usize

pub fn aead_cmax() -> usize

pub fn aead_nmin() -> usize

pub fn aead_nmax() -> usize

pub fn aead_kind() -> AeadCipherKind

pub fn aead_new(key: &[u8]) -> Self

pub fn aead_encrypt_slice(&self, nonce: &[u8], aad: &[u8], aead_pkt: &mut [u8])

pub fn aead_decrypt_slice(
    &self,
    nonce: &[u8],
    aad: &[u8],
    aead_pkt: &mut [u8]
) -> bool

pub fn aead_encrypt_slice_detached(
    &self,
    nonce: &[u8],
    aad: &[u8],
    plaintext_in_ciphertext_out: &mut [u8],
    tag_out: &mut [u8]
)

pub fn aead_decrypt_slice_detached(
    &self,
    nonce: &[u8],
    aad: &[u8],
    ciphertext_in_plaintext_out: &mut [u8],
    tag_in: &[u8]
) -> bool

Loading content...

Implementors

impl AeadCipher for Chacha20Poly1305[src]

impl AeadCipher for Aes128Ccm8[src]

impl AeadCipher for Aes128Ccm[src]

impl AeadCipher for Aes128CcmShort8[src]

impl AeadCipher for Aes128CcmShort12[src]

impl AeadCipher for Aes128CcmShort[src]

impl AeadCipher for Aes128Gcm8[src]

impl AeadCipher for Aes128Gcm12[src]

impl AeadCipher for Aes128Gcm[src]

impl AeadCipher for Aes128GcmSiv[src]

impl AeadCipher for Aes128OcbTag64[src]

impl AeadCipher for Aes128OcbTag96[src]

impl AeadCipher for Aes128OcbTag128[src]

impl AeadCipher for Aes192OcbTag64[src]

impl AeadCipher for Aes192OcbTag96[src]

impl AeadCipher for Aes192OcbTag128[src]

impl AeadCipher for Aes256Ccm8[src]

impl AeadCipher for Aes256Ccm[src]

impl AeadCipher for Aes256CcmShort8[src]

impl AeadCipher for Aes256CcmShort12[src]

impl AeadCipher for Aes256CcmShort[src]

impl AeadCipher for Aes256Gcm8[src]

impl AeadCipher for Aes256Gcm12[src]

impl AeadCipher for Aes256Gcm[src]

impl AeadCipher for Aes256GcmSiv[src]

impl AeadCipher for Aes256OcbTag64[src]

impl AeadCipher for Aes256OcbTag96[src]

impl AeadCipher for Aes256OcbTag128[src]

impl AeadCipher for AesSivCmac256[src]

impl AeadCipher for AesSivCmac384[src]

impl AeadCipher for AesSivCmac512[src]

Loading content...