DefaultKeyManager

Default KeyManager.

For SDK >= 23, private keys are stored encrypted in shared preferences using AES-GCM, and a random key in the Android Key Store.

For SDK < 23, private keys are stored in plain text in shared preferences.

Constructors

Link copied to clipboard
constructor(context: Context)

Functions

Link copied to clipboard
open override fun decrypt(instance: String, sealed: ByteArray): ByteArray?

Decrypt sealed with instance's keys.

Link copied to clipboard
open override fun delete(instance: String)

Delete key set for instance.

Link copied to clipboard
open override fun exists(instance: String): Boolean

Check if the key set for instance exists and is valid.

Link copied to clipboard
open override fun generate(instance: String)

Generate a new key pair and auth secret for instance.

Link copied to clipboard
open override fun getPublicKeySet(instance: String): PublicKeySet?

Get PublicKeySet for instance. Encoded to be shared to the application server.