WithDedicatedMac
sealed interface WithDedicatedMac<I : NonceTrait> : SymmetricKey<AuthCapability.Authenticated.WithDedicatedMac, I, KeyType.WithDedicatedMacKey> , SymmetricKey.Authenticating<AuthCapability.Authenticated.WithDedicatedMac, I, KeyType.WithDedicatedMacKey> (source)
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
Inheritors
Types
Link copied to clipboard
class RequiringNonce constructor( val algorithm: SymmetricEncryptionAlgorithm<AuthCapability.Authenticated.WithDedicatedMac, NonceTrait.Required, KeyType.WithDedicatedMacKey>, encryptionKey: ByteArray, dedicatedMacKey: ByteArray, val additionalProperties: MutableMap<String, String> = mutableMapOf<String, String>()) : SymmetricKey.WithDedicatedMac<NonceTrait.Required> , SymmetricKey.RequiringNonce<AuthCapability.Authenticated.WithDedicatedMac, KeyType.WithDedicatedMacKey>
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
abstract override val algorithm: SymmetricEncryptionAlgorithm<AuthCapability.Authenticated.WithDedicatedMac, I, KeyType.WithDedicatedMacKey>
Link copied to clipboard
The actual encryption key bytes
Link copied to clipboard
val <I : NonceTrait> SymmetricKey<AuthCapability.Authenticated.WithDedicatedMac, I, out KeyType.WithDedicatedMacKey>.encryptionKey: KmmResult<ByteArray>
The encryption key bytes, if present.
Link copied to clipboard
val <I : NonceTrait> SymmetricKey<AuthCapability.Authenticated.WithDedicatedMac, I, out KeyType.WithDedicatedMacKey>.macKey: KmmResult<ByteArray>
The dedicated MAC key bytes, if present.
Link copied to clipboard
val <A : AuthCapability<out KeyType.Integrated>, I : NonceTrait> SymmetricKey<A, I, out KeyType.Integrated>.secretKey: KmmResult<ByteArray>
The actual encryption key bytes
Functions
Link copied to clipboard
Use to smart cast
Link copied to clipboard
fun <A : AuthCapability<K>, K : KeyType, I : NonceTrait> SymmetricKey<A, I, K>.isAuthenticated(): Boolean
Use to smart cast
Link copied to clipboard
fun <A : AuthCapability.Authenticated<*>, I : NonceTrait> SymmetricKey<A, I, *>.isIntegrated(): Boolean
Use to smart cast
Link copied to clipboard
Use to smart cast