Bootstrap constructor
Bootstrap({
- required Encryption encryption,
- void onUpdate()?,
Implementation
Bootstrap({required this.encryption, this.onUpdate}) {
final defaultKeyId = encryption.ssss.defaultKeyId;
final hasValidDefaultKey =
defaultKeyId != null && encryption.ssss.isKeyValid(defaultKeyId);
if (analyzeSecrets().isNotEmpty || hasValidDefaultKey) {
state = BootstrapState.askWipeSsss;
} else {
state = BootstrapState.askNewSsss;
}
}