encrypt

open suspend override fun encrypt(data: ByteArray, aad: ByteArray, contentAlgorithm: EncryptionContentAlgorithm): JweEncryptResult(source)

Generates a random CEK for contentAlgorithm, encrypts it with the hardware-backed RSA public key using OAEP padding, then encrypts data with the CEK using contentAlgorithm.

Returns a JweEncryptResult containing the wrapped key, IV, ciphertext, and authentication tag ready for use as JWE token parts.