pub struct AeadBox { /* private fields */ }Implementations§
Source§impl AeadBox
impl AeadBox
pub fn new(key: [u8; 32]) -> Self
pub fn with_key_id(key: [u8; 32], key_id: [u8; 8]) -> Self
pub fn encrypt( &self, plaintext: &[u8], user_ad: &[u8], ) -> EnigmaAeadResult<Vec<u8>>
pub fn encrypt_with_nonce( &self, plaintext: &[u8], user_ad: &[u8], nonce: [u8; 24], ) -> EnigmaAeadResult<Vec<u8>>
pub fn decrypt( &self, packet: &[u8], user_ad: &[u8], ) -> EnigmaAeadResult<Vec<u8>>
pub fn seal( &self, nonce: [u8; 24], plaintext: &[u8], aad: &[u8], ) -> EnigmaAeadResult<Vec<u8>>
pub fn open( &self, nonce: [u8; 24], ciphertext: &[u8], aad: &[u8], ) -> EnigmaAeadResult<Vec<u8>>
pub fn parse_packet(packet: &[u8]) -> EnigmaAeadResult<PacketParts>
Auto Trait Implementations§
impl Freeze for AeadBox
impl RefUnwindSafe for AeadBox
impl Send for AeadBox
impl Sync for AeadBox
impl Unpin for AeadBox
impl UnwindSafe for AeadBox
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more