Constructors

Link copied to clipboard

Properties

Link copied to clipboard
open override val authTagSize: BitLength
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val keySize: BitLength

Key length

Link copied to clipboard
open override val mac: HMAC

The mac function used to provide authenticated encryption

Link copied to clipboard

Specifies how the inputs to the MAC are to be encoded/processed

Link copied to clipboard

Specifies how the inputs to the MAC are to be encoded/processed

Link copied to clipboard
Link copied to clipboard
open override val name: String

Human-readable name

Link copied to clipboard
abstract val nonceSize: BitLength
Link copied to clipboard

Indicates if this algorithm requires a nonce.

Link copied to clipboard
abstract val oid: ObjectIdentifier
Link copied to clipboard
open override val preferredMacKeyLength: BitLength

The preferred length pf the MAC key. Can be overridden during key generation and is unconstrained.

Link copied to clipboard

Creates a SealedBoxBuilder matching this algorithm's characteristics:

Functions

Link copied to clipboard
fun Custom(tagLength: BitLength, dedicatedMacInputCalculation: MacInputCalculation): SymmetricEncryptionAlgorithm.AES.CBC.HMAC
fun Custom(    tagLength: BitLength,     dedicatedMacAuthTagTransformation: MacAuthTagTransformation,     dedicatedMacInputCalculation: MacInputCalculation): SymmetricEncryptionAlgorithm.AES.CBC.HMAC

Instantiates a new CBC.HMAC instance with

Link copied to clipboard
@JvmName(name = "hasDedicatedMacAlias")
fun <I : NonceTrait> SymmetricEncryptionAlgorithm<*, I, *>.hasDedicatedMac(): Boolean

Use to smart-cast this algorithm

Link copied to clipboard
@JvmName(name = "isAuthenticatedAlias")
fun <I : NonceTrait, K : KeyType> SymmetricEncryptionAlgorithm<*, I, K>.isAuthenticated(): Boolean

Use to smart-cast this algorithm

Link copied to clipboard
@JvmName(name = "isBlockCipherAlias")
fun <A : AuthCapability<out K>, I : NonceTrait, K : KeyType> SymmetricEncryptionAlgorithm<A, I, K>.isBlockCipher(): Boolean

Use to smart-cast this algorithm

Link copied to clipboard

Use to smart-cast this algorithm

Link copied to clipboard
@JvmName(name = "isStreamCipherAlias")
fun <A : AuthCapability<out K>, I : NonceTrait, K : KeyType> SymmetricEncryptionAlgorithm<A, I, K>.isStreamCipher(): Boolean

Use to smart-cast this algorithm

Link copied to clipboard

Creates a SymmetricKey from the specified secretKey. Returns KmmResult.failure in case the provided bytes don't match SymmetricEncryptionAlgorithm.keySize

Creates a SymmetricKey from the specified encryptionKey and macKey. Returns KmmResult.failure in case the provided bytes don't match SymmetricEncryptionAlgorithm.keySize or the specified macKey is empty.

Link copied to clipboard

Generates a fresh random key for this algorithm.

Generates a fresh random key for this algorithm. macKeyLength can be specified to override preferredMacKeyLength.

Link copied to clipboard

Generates a new random nonce matching the Nonce size of this algorithm. You typically don't want to use this, but have your nonces auto-generated during the encryption process

Link copied to clipboard
@JvmName(name = "requiresNonceAlias")
fun <A : AuthCapability<out K>, K : KeyType> SymmetricEncryptionAlgorithm<A, *, K>.requiresNonce(): Boolean

Use to smart-cast this algorithm

Link copied to clipboard
abstract override fun toString(): String