iroh_quinn::crypto

Trait AeadKey

Source
pub trait AeadKey {
    // Required methods
    fn seal(
        &self,
        data: &mut Vec<u8>,
        additional_data: &[u8],
    ) -> Result<(), CryptoError>;
    fn open<'a>(
        &self,
        data: &'a mut [u8],
        additional_data: &[u8],
    ) -> Result<&'a mut [u8], CryptoError>;
}
Expand description

A key for sealing data with AEAD-based algorithms

Required Methods§

Source

fn seal( &self, data: &mut Vec<u8>, additional_data: &[u8], ) -> Result<(), CryptoError>

Method for sealing message data

Source

fn open<'a>( &self, data: &'a mut [u8], additional_data: &[u8], ) -> Result<&'a mut [u8], CryptoError>

Method for opening a sealed message data

Implementations on Foreign Types§

Source§

impl AeadKey for LessSafeKey

Source§

fn seal( &self, data: &mut Vec<u8>, additional_data: &[u8], ) -> Result<(), CryptoError>

Source§

fn open<'a>( &self, data: &'a mut [u8], additional_data: &[u8], ) -> Result<&'a mut [u8], CryptoError>

Implementors§