Module data

Module data 

Source
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.
GenericArray
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§

Algo

Constants§

AES_GCM_NONCE_SIZE
Nonce size (in bytes) of AES-GCM (excludes 0)
AES_GCM_TAG_SIZE

Traits§

AeadInPlace
In-place stateless AEAD trait.
EncryptorBase
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§

Aes128Gcm
AES-GCM with a 128-bit key and 96-bit nonce.
Aes256Gcm
AES-GCM with a 256-bit key and 96-bit nonce.
AesGcm128Enc
AesGcm256Enc
Nonce
AES-GCM nonces.
Result
Tag
AES-GCM tags.