From 9a543d4e6a15094b2a0e58e065c62a963d0e9196 Mon Sep 17 00:00:00 2001 From: Paul Kraft Date: Tue, 15 Oct 2024 16:22:57 -0700 Subject: [PATCH] Keep backwards compatibility --- Sources/SpeziLocalStorage/LocalStorageSetting.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/SpeziLocalStorage/LocalStorageSetting.swift b/Sources/SpeziLocalStorage/LocalStorageSetting.swift index 0646c6f..1b86751 100644 --- a/Sources/SpeziLocalStorage/LocalStorageSetting.swift +++ b/Sources/SpeziLocalStorage/LocalStorageSetting.swift @@ -22,6 +22,10 @@ public enum LocalStorageSetting { /// Encrypted using a `eciesEncryptionCofactorX963SHA256AESGCM` key stored in the Keychain. case encryptedUsingKeyChain(userPresence: Bool = false, excludedFromBackup: Bool = true) + @available(*, deprecated, renamed: "encrypted(keys:excludedFromBackup:)") + static func encrypted(privateKey: SecKey, publicKey: SecKey, excludedFromBackup: Bool = true) -> LocalStorageSetting { + .encrypted(keys: (privateKey, publicKey), excludedFromBackup: excludedFromBackup) + } var excludedFromBackup: Bool { switch self {