WalletKeyManager

Manages the AES-256 master key in Android Keystore.

The master key encrypts the wallet's seed material at rest. It is:

  • Non-extractable: key material never leaves the secure hardware

  • Biometric-gated: per-use authentication required (duration=0)

  • StrongBox-preferred: falls back to TEE if StrongBox unavailable

The key supports both BIOMETRIC_STRONG and DEVICE_CREDENTIAL (PIN/pattern), with CryptoObject binding for TEE-level per-operation enforcement (API 30+).

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Creates a Cipher initialized for decryption with the master key.

Link copied to clipboard

Creates a Cipher initialized for encryption with the master key.

Link copied to clipboard
fun deleteKey()

Deletes the master key from the Keystore.

Link copied to clipboard

Generates a new master key in the Keystore.

Link copied to clipboard

Whether a master key already exists in the Keystore.