#[repr(u8)]pub enum AeadAlgorithm {
Show 16 variants
None = 0,
Eax = 1,
Ocb = 2,
Gcm = 3,
Private100 = 100,
Private101 = 101,
Private102 = 102,
Private103 = 103,
Private104 = 104,
Private105 = 105,
Private106 = 106,
Private107 = 107,
Private108 = 108,
Private109 = 109,
Private110 = 110,
Other(u8),
}
Expand description
Available AEAD algorithms.
Variants§
None = 0
None
Eax = 1
Ocb = 2
Gcm = 3
Private100 = 100
Private101 = 101
Private102 = 102
Private103 = 103
Private104 = 104
Private105 = 105
Private106 = 106
Private107 = 107
Private108 = 108
Private109 = 109
Private110 = 110
Other(u8)
Implementations§
Source§impl AeadAlgorithm
impl AeadAlgorithm
Sourcepub fn nonce_size(&self) -> usize
pub fn nonce_size(&self) -> usize
Nonce size used for this AEAD algorithm.
Sourcepub fn decrypt_in_place(
&self,
sym_algorithm: &SymmetricKeyAlgorithm,
key: &[u8],
nonce: &[u8],
associated_data: &[u8],
auth_tag: &[u8],
buffer: &mut [u8],
) -> Result<()>
pub fn decrypt_in_place( &self, sym_algorithm: &SymmetricKeyAlgorithm, key: &[u8], nonce: &[u8], associated_data: &[u8], auth_tag: &[u8], buffer: &mut [u8], ) -> Result<()>
Decrypt the provided data in place.
Sourcepub fn encrypt_in_place(
&self,
sym_algorithm: &SymmetricKeyAlgorithm,
key: &[u8],
nonce: &[u8],
associated_data: &[u8],
buffer: &mut [u8],
) -> Result<Vec<u8>>
pub fn encrypt_in_place( &self, sym_algorithm: &SymmetricKeyAlgorithm, key: &[u8], nonce: &[u8], associated_data: &[u8], buffer: &mut [u8], ) -> Result<Vec<u8>>
Encrypt the provided data in place.
Trait Implementations§
Source§impl Clone for AeadAlgorithm
impl Clone for AeadAlgorithm
Source§fn clone(&self) -> AeadAlgorithm
fn clone(&self) -> AeadAlgorithm
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AeadAlgorithm
impl Debug for AeadAlgorithm
Source§impl From<AeadAlgorithm> for u8
impl From<AeadAlgorithm> for u8
Source§fn from(enum_value: AeadAlgorithm) -> Self
fn from(enum_value: AeadAlgorithm) -> Self
Converts to this type from the input type.
Source§impl From<u8> for AeadAlgorithm
impl From<u8> for AeadAlgorithm
Source§impl FromPrimitive for AeadAlgorithm
impl FromPrimitive for AeadAlgorithm
Source§impl PartialEq for AeadAlgorithm
impl PartialEq for AeadAlgorithm
impl Copy for AeadAlgorithm
impl Eq for AeadAlgorithm
impl StructuralPartialEq for AeadAlgorithm
Auto Trait Implementations§
impl Freeze for AeadAlgorithm
impl RefUnwindSafe for AeadAlgorithm
impl Send for AeadAlgorithm
impl Sync for AeadAlgorithm
impl Unpin for AeadAlgorithm
impl UnwindSafe for AeadAlgorithm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more