tuweni / org.apache.tuweni.crypto.sodium / HMACSHA256 / authenticate

authenticate

static fun authenticate(message: Bytes!, key: Key!): Bytes! (source)

Authenticates a message using a secret into a HMAC-SHA-256 authenticator.

Parameters

message - Bytes!: the message to authenticate

key - Key!: the secret key to use for authentication

Return
Bytes!: the authenticator of the message

static fun authenticate(message: ByteArray!, key: Key!): ByteArray! (source)

Authenticates a message using a secret into a HMAC-SHA-256 authenticator.

Parameters

message - ByteArray!: the message to authenticate

key - Key!: the secret key to use for authentication

Return
ByteArray!: the authenticator of the message