mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 19:34:25 +02:00
Secure backup: Allow to execute a random closure the secure backup is unlocked
Only from swift. We should change the name "SecretsRecovery" classes
This commit is contained in:
@@ -16,10 +16,28 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
enum SecretsRecoveryGoal {
|
||||
case `default`
|
||||
case keyBackup
|
||||
/// Unlock the secure backup (4S) to get the private key and execute a closure during the flow
|
||||
case unlockSecureBackup ((_ privateKey: Data, _ completion: @escaping (Result<Void, Error>) -> Void) -> Void)
|
||||
case verifyDevice
|
||||
case restoreSecureBackup
|
||||
}
|
||||
|
||||
@objc
|
||||
enum SecretsRecoveryGoal: Int {
|
||||
enum SecretsRecoveryGoalBridge: Int {
|
||||
case `default`
|
||||
case keyBackup
|
||||
case verifyDevice
|
||||
case restoreSecureBackup
|
||||
|
||||
var goal: SecretsRecoveryGoal {
|
||||
switch self {
|
||||
case .default: return .default
|
||||
case .keyBackup: return .keyBackup
|
||||
case .verifyDevice: return .verifyDevice
|
||||
case .restoreSecureBackup: return .restoreSecureBackup
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user