tuweni / org.apache.tuweni.crypto.sodium / HMACSHA512

HMACSHA512

class HMACSHA512 (source)

Message authentication code support for HMAC-SHA-512.

Types

Key

A HMACSHA512 secret key.

class Key : Destroyable

Functions

authenticate

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

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

verify

Verifies the authenticator of a message matches according to a secret.

static fun verify(authenticator: Bytes!, in: Bytes!, key: Key!): Boolean
static fun verify(authenticator: ByteArray!, in: ByteArray!, key: Key!): Boolean