CryptoSetupExtension extension
- on
Methods
-
getCryptoIdentityState(
) → Future< ({bool connected, bool initialized})> -
Available on Client, provided by the CryptoSetupExtension extension
Returns the current state of the crypto identity. The crypto identity isinitializedif key backup and cross signing are correctly set up. You can initialize a new account by usingClient.initCryptoIdentity(). The crypto identity isconnectedif this device has all the secrets cached locally. This usually includes that this device has signed itself. You can useClient.restoreCryptoIdentity()to connect orClient.initCryptoIdentity()to wipe the current identity in case of that you lost your recovery key / passphrase and have no other way to restore. -
initCryptoIdentity(
{String? passphrase, bool wipeSecureStorage = true, bool wipeKeyBackup = true, bool wipeCrossSigning = true, bool setupMasterKey = true, bool setupSelfSigningKey = true, bool setupUserSigningKey = true, bool setupOnlineKeyBackup = true, String? keyName}) → Future< String> -
Available on Client, provided by the CryptoSetupExtension extension
Bootsraps a new crypto identity for the client. Creates secret storage and cross-signing keys and optionally online key backup. Returns the generated recovery key when secret storage is newly created. -
restoreCryptoIdentity(
String keyOrPassphrase, {String? keyIdentifier, bool selfSign = true}) → Future< void> -
Available on Client, provided by the CryptoSetupExtension extension
Reconnects to an already initialized crypto identity using the provided recovery key or passphrase. Throws if encryption is unavailable, the identity is not initialized, or it is already connected.