encrypt

fun encrypt(aesKey: ByteArray, appMetadata: ByteArray): ByteArray

Encrypts appMetadata into the v2 blob.

Parameters

aesKey

32-byte AES-256 key (from PrfKeyDeriver).

appMetadata

The bytes to encrypt. Zero-length array is allowed — the blob then encodes metadataLen=0.