KeyUnlockDataProvider
An object that provides KeyUnlockData when a key is SecureArea is locked.
When SecureArea.sign or SecureArea.keyAgreement call is made and the key is locked, current coroutineContext is queried for this interface using KeyUnlockDataProvider.Key. If it is found, getKeyUnlockData is used to obtain KeyUnlockData to unlock the key and the operation (signing or key agreement) is retried.
Note: there is no further retries if returned KeyUnlockData fails to unlock the key. This is so non-interactive KeyUnlockDataProvider implementations do not have to deal with retry logic if the unlock data fails to unlock the key. If retry is necessary, it should be implemented inside by KeyUnlockDataProvider itself (which may be SecureArea-specific).
If KeyUnlockDataProvider is not found, SecureArea can use its own default implementation that requires PromptModel in the current coroutine context. Use PromptModel.toHumanReadable to customize text that is used in the prompts.
Inheritors
Functions
Provides KeyUnlockData for a SecureArea-key-based operation.