CloudSecureArea

open class CloudSecureArea(storageTable: StorageTable, val identifier: String, val serverUrl: String, httpClientEngineFactory: HttpClientEngineFactory<*>, random: Random = Crypto.secureRandom) : SecureArea

An implementation of SecureArea using a Secure Area managed by an external server.

Constructors

Link copied to clipboard
protected constructor(storageTable: StorageTable, identifier: String, serverUrl: String, httpClientEngineFactory: HttpClientEngineFactory<*>, random: Random = Crypto.secureRandom)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val displayName: String

The name of the Secure Area, suitable for displaying to the end user.

Link copied to clipboard
override val identifier: String

A stable identifier for the Secure Area.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val supportedAlgorithms: List<Algorithm>

The list of algorithms the Secure Area supports.

Functions

Link copied to clipboard
open suspend override fun batchCreateKey(numKeys: Int, createKeySettings: CreateKeySettings): BatchCreateKeyResult

Creates a batch of new keys.

Link copied to clipboard
open suspend override fun createKey(alias: String?, createKeySettings: CreateKeySettings): CloudKeyInfo

Creates a new key.

Link copied to clipboard
open suspend override fun deleteKey(alias: String)

Deletes a previously created key.

Link copied to clipboard
open suspend override fun getKeyInfo(alias: String): CloudKeyInfo

Gets information about a key.

Link copied to clipboard
open suspend override fun getKeyInvalidated(alias: String): Boolean

Checks whether the key has been invalidated.

Link copied to clipboard

The PassphraseConstraints configured at registration time.

Link copied to clipboard
protected open suspend fun initialize()

Loads persisted Cloud Secure Area state and initializes its platform secure area.

Link copied to clipboard
open suspend override fun kemDecapsulate(alias: String, ciphertext: ByteArray, unlockReason: Reason): SecureByteString

Performs Key Decapsulation.

Link copied to clipboard
open suspend override fun keyAgreement(alias: String, otherKey: EcPublicKey, unlockReason: Reason): SecureByteString

Performs Key Agreement.

Link copied to clipboard
suspend fun register(passphrase: String, passphraseConstraints: PassphraseConstraints, onAuthorizeRootOfTrust: (cloudSecureAreaRootOfTrust: X509Cert) -> Boolean)

Registers with the cloud secure area.

Link copied to clipboard
open suspend override fun sign(alias: String, dataToSign: ByteArray, unlockReason: Reason): Signature

Signs data with a key.

Link copied to clipboard
open suspend override fun unlockKey(alias: String, unlockReason: Reason): List<KeyUnlockData>

Unlocks a key requiring user authentication.

Link copied to clipboard
suspend fun unregister()