GCM

AES in Galois/Counter Mode (GCM), an authenticated encryption scheme as defined in NIST SP 800-38D.

Provides confidentiality and authenticity with support for associated data. Uses a 96-bit (12-byte) IV by default.

val key = provider.get(AES.GCM).keyGenerator().generateKey()
val ciphertext = key.cipher().encrypt(plaintext)

Types

Link copied to clipboard
Link copied to clipboard

An AES-GCM key that provides authenticated encryption and decryption via cipher.

Properties

Link copied to clipboard
open override val id: CryptographyAlgorithmId<AES.GCM>

The typed identifier that uniquely distinguishes this algorithm and is used to look it up from a CryptographyProvider.

Functions

Link copied to clipboard

Returns a Decoder that decodes AES keys from the specified Key.Format.

Link copied to clipboard
abstract fun keyGenerator(keySize: BinarySize = Key.Size.B256): KeyGenerator<AES.GCM.Key>

Returns a KeyGenerator that generates AES keys of the given keySize.