ECB

AES in Electronic Codebook (ECB) mode as defined in NIST SP 800-38A.

Encrypts each block independently without an initialization vector. Identical plaintext blocks produce identical ciphertext blocks, making this mode unsuitable for most use cases except for legacy compatibility.

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

Types

Link copied to clipboard
Link copied to clipboard

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

Properties

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

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.ECB.Key>

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