DefaultTokenEncryptionHandler

class DefaultTokenEncryptionHandler(keyStore: KeyStore = AndroidKeystoreUtil.keyStore, keyPairGenerator: KeyPairGenerator = AndroidKeystoreUtil.getRsaKeyPairGenerator()) : TokenEncryptionHandler

Constructors

Link copied to clipboard
constructor(keyStore: KeyStore = AndroidKeystoreUtil.keyStore, keyPairGenerator: KeyPairGenerator = AndroidKeystoreUtil.getRsaKeyPairGenerator())

Functions

Link copied to clipboard
open suspend override fun decrypt(encryptedToken: ByteArray, encryptionExtras: Map<String, String>, security: Credential.Security, promptInfo: BiometricPrompt.PromptInfo?): Token

Decrypt the provided encryptedToken, and return the Token.

Link copied to clipboard
open suspend override fun encrypt(token: Token, security: Credential.Security): TokenEncryptionHandler.EncryptionResult

Encrypt the provided token with security, and return the EncryptionResult.

Link copied to clipboard
open override fun generateKey(security: Credential.Security)

Generate the key with the specified Credential.Security. If a key with Credential.Security.keyAlias already exists, do nothing.