generateKey

fun generateKey(size: Int = KEY_SIZE): ByteArray

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

Return

A ByteArray containing the generated key.

Parameters

size

The size of the key in bytes (default: KEY_SIZE).