Companion

object Companion

Functions

Link copied to clipboard
fun generate(input: String, key: ByteArray = generateKey()): HmacSha256.Result

Generates an HMAC-SHA256 tag for an input string using the specified or generated key.

Link copied to clipboard
fun generateKey(size: Int = KEY_SIZE): ByteArray

Generates a random key for use in HMAC-SHA256 computation.

Link copied to clipboard

Generates an HMAC-SHA256 tag for this string using the specified or generated key.

Link copied to clipboard

Verifies an input string against a provided HMAC-SHA256 tag and key.

Link copied to clipboard

Verifies an input string against this HMAC-SHA256 tag and the provided key.

Verifies this string against a provided HMAC-SHA256 tag and key.