mac

expect 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 fun mac(algorithm: <Error class: unknown class>, key: ByteArray, message: ByteArray): ByteArray
actual 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.