mac

expect suspend fun mac(algorithm: Algorithm, key: ByteArray, message: ByteArray): ByteArray

Message authentication code function.

Return

the message authentication code.

Parameters

key

the secret key.

message

the message to authenticate.

Throws

if the given algorithm is not supported.

actual suspend fun mac(algorithm: <Error class: unknown class>, key: ByteArray, message: ByteArray): ByteArray
actual suspend fun mac(algorithm: Algorithm, key: ByteArray, message: ByteArray): ByteArray

Message authentication code function.

Return

the message authentication code.

Parameters

key

the secret key.

message

the message to authenticate.

Throws

if the given algorithm is not supported.

actual suspend fun mac(algorithm: Algorithm, key: ByteArray, message: ByteArray): ByteArray