mac

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.