SymmetricKey

sealed interface SymmetricKey<A : AuthCapability<out K>, I : NonceTrait, K : KeyType>(source)

Symmetric encryption key. Can only be used for the specified algorithm.

Inheritors

Types

Link copied to clipboard
Link copied to clipboard

Self-Contained encryption key, i.e. a single byte array is sufficient

Link copied to clipboard
Link copied to clipboard

Encryption key with dedicated MAC key. Used for non-authenticated ciphers that use an external MAC function to bolt on AEAD capabilities, such as SymmetricEncryptionAlgorithm.AES.GCM

Link copied to clipboard

Properties

Link copied to clipboard

This is meant for storing additional properties, which may be relevant for certain use cases. For example, Json Web Keys or COSE keys may define an arbitrary key IDs. This is not meant for Algorithm parameters! If an algorithm needs parameters, the implementing classes should be extended

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The dedicated MAC key bytes, if present.

Link copied to clipboard

The actual encryption key bytes

Functions

Link copied to clipboard

Use to smart cast

Link copied to clipboard

Use to smart cast

Link copied to clipboard
Link copied to clipboard

Use to smart cast