TokenEncryptionHandler

Platform-agnostic interface for encrypting and decrypting token data.

Implementations may use platform-specific mechanisms such as Android KeyStore, JVM key management, or custom encryption schemes. The EncryptionResult.encryptionExtras map allows implementations to persist platform-specific metadata (IVs, key aliases, etc.) alongside the ciphertext.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun decrypt(ciphertext: ByteArray, encryptionExtras: Map<String, String>): ByteArray

Decrypts the given ciphertext bytes.

Link copied to clipboard
abstract suspend fun encrypt(plaintext: ByteArray): EncryptionResult

Encrypts the given plaintext bytes.