PlatformKeyProvider

Platform abstraction for creating, loading, and deleting mobile wallet signing keys.

Inheritors

AndroidPlatformKeyProvider
IosPlatformKeyProvider

Types

Link copied to clipboard
object Companion

Shared defaults for platform key providers.

Properties

Link copied to clipboard

Whether the current device and provider can use platform-backed storage.

Link copied to clipboard
abstract val supportedPlatformKeyTypes: Set<KeyType>

Key types that this provider can create with platform-backed storage.

Functions

Link copied to clipboard
abstract suspend fun deleteKey(keyId: String, keyType: KeyType): Boolean

Deletes a key from the platform key store.

Link copied to clipboard
abstract suspend fun exportSoftwareKeyMaterial(key: Key): ByteArray

Exports serialized JWK material from a software key.

Link copied to clipboard
abstract suspend fun generateKey(keyType: KeyType, keyId: String? = null): Key

Creates a new key, using platform-backed storage when this provider supports keyType.

Link copied to clipboard
open fun isPlatformBacked(keyType: KeyType): Boolean

Returns whether keyType is created with platform-backed storage by this provider.

Link copied to clipboard
abstract suspend fun loadKey(keyId: String, keyType: KeyType): Key?

Loads a previously generated key.

Link copied to clipboard
abstract suspend fun loadSoftwareKey(keyId: String, keyType: KeyType, jwkMaterial: ByteArray): Key?

Loads a serialized software key for platforms that need a non-platform-backed fallback.