[−][src]Enum noise_sodiumoxide::Aes256Gcm
The AES-256-GCM AEAD.
Portability Warning
The current implementation of this construction is hardware-accelerated and requires the Intel SSSE3 extensions, as well as the aesni
and pclmul
instructions.
Intel Westmere processors (introduced in 2010) and newer meet the requirements.
There are no plans to support non hardware-accelerated implementations of AES-GCM. If portability is a concern, use ChaCha20-Poly1305 instead.
Before using the functions below, hardware support for AES can be checked with Aes256Gcm::available.
The function returns true
if the current CPU supports the AES256-GCM implementation, and false
if it doesn't.
The library must have been initialized with init prior to calling this function.
Libsodium doc: https://libsodium.gitbook.io/doc/secret-key_cryptography/aead/aes-256-gcm#limitations.
Methods
impl Aes256Gcm
[src]
pub fn available() -> bool
[src]
Check for hardware support of AES-GCM.
The function returns true
if the current CPU supports the AES256-GCM implementation, and false
if it doesn't.
Trait Implementations
impl Cipher for Aes256Gcm
[src]
type Key = Sensitive<[u8; 32]>
Type of key.
fn name() -> &'static str
[src]
fn encrypt(
k: &Self::Key,
nonce: u64,
ad: &[u8],
plaintext: &[u8],
out: &mut [u8]
)
[src]
k: &Self::Key,
nonce: u64,
ad: &[u8],
plaintext: &[u8],
out: &mut [u8]
)
fn decrypt(
k: &Self::Key,
nonce: u64,
ad: &[u8],
ciphertext: &[u8],
out: &mut [u8]
) -> Result<(), ()>
[src]
k: &Self::Key,
nonce: u64,
ad: &[u8],
ciphertext: &[u8],
out: &mut [u8]
) -> Result<(), ()>
fn key_len() -> usize
[src]
fn tag_len() -> usize
[src]
fn rekey(k: &Self::Key) -> Self::Key
[src]
Auto Trait Implementations
impl Send for Aes256Gcm
impl Unpin for Aes256Gcm
impl Sync for Aes256Gcm
impl UnwindSafe for Aes256Gcm
impl RefUnwindSafe for Aes256Gcm
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,