requestPassphrase
Requests that the UI layer should ask the user for a passphrase.
If passphraseEvaluator is not null
, it is called every time the user inputs a passphrase with the passphrase that was entered. It should return null
to indicate the passphrase is correct otherwise a short message which is displayed in prompt indicating the user entered the wrong passphrase and optionally how many attempts are remaining.
To dismiss the prompt programmatically, cancel the job the coroutine was launched in.
Return
the passphrase entered by the user.
Parameters
the title for the passphrase prompt.
the subtitle for the passphrase prompt.
the PassphraseConstraints for the passphrase.
an optional function to evaluate the passphrase and give the user feedback.
Throws
if user dismissed passphrase prompt dialog.
if coroutineContext does not have PromptModel.
if the UI layer hasn't bound any UI for PromptModel.