useExistingSsss method
void
useExistingSsss(
- bool use, {
- String? keyIdentifier,
})
Implementation
void useExistingSsss(bool use, {String? keyIdentifier}) {
if (state != BootstrapState.askUseExistingSsss) {
throw BootstrapBadStateException('Wrong State');
}
if (use) {
try {
newSsssKey = encryption.ssss.open(keyIdentifier);
state = BootstrapState.openExistingSsss;
} catch (e, s) {
Logs().e('[Bootstrapping] Error open SSSS', e, s);
state = BootstrapState.error;
return;
}
} else if (badSecrets().isNotEmpty) {
state = BootstrapState.askBadSsss;
} else {
migrateOldSsss();
}
}