Expand description
Data encryption with AEAD (Authenticated encryption).
Macros§
- decrypt_
aes_ gcm - Quickly decrypt AES-GCM data.
Structs§
- EncAlgo
- Struct to represent an object to encrypt data with some encryption algorithm.
- Generic
Array - Struct representing a generic array -
GenericArray<T, N>works like [T; N] - OsRng
- A random number generator that retrieves randomness from the operating system.
- SData
- Safe Data. Zeros when dropped.
Enums§
Constants§
- AES_
GCM_ NONCE_ SIZE - Nonce size (in bytes) of AES-GCM (excludes 0)
- AES_
GCM_ TAG_ SIZE
Traits§
- Aead
InPlace - In-place stateless AEAD trait.
- Encryptor
Base - KeyInit
- Types which can be initialized from key.
- RngCore
- The core of a random number generator.
- TagSize
- Trait implemented for valid tag sizes, i.e.
[
U12][consts::U12], [U13][consts::U13], [U14][consts::U14], [U15][consts::U15] and [U16][consts::U16].
Functions§
- create_
128_ encryptor - Creates a new AES-GCM-128 encryptor.
[
key] must be at least 16 bytes long. - create_
256_ encryptor - Creates a new AES-GCM-256 encryptor.
[
key] must be at least 32 bytes long.
Type Aliases§
- Aes128
Gcm - AES-GCM with a 128-bit key and 96-bit nonce.
- Aes256
Gcm - AES-GCM with a 256-bit key and 96-bit nonce.
- AesGcm128
Enc - AesGcm256
Enc - Nonce
- AES-GCM nonces.
- Result
- Tag
- AES-GCM tags.