diff --git a/Sources/LocalData/Services/EncryptionHelper.swift b/Sources/LocalData/Services/EncryptionHelper.swift index b80570e..0488479 100644 --- a/Sources/LocalData/Services/EncryptionHelper.swift +++ b/Sources/LocalData/Services/EncryptionHelper.swift @@ -3,7 +3,7 @@ import CryptoKit /// Actor that handles all encryption and decryption operations. /// Uses AES-GCM for symmetric encryption with PBKDF2 key derivation. -public actor EncryptionHelper { +actor EncryptionHelper { public static let shared = EncryptionHelper() diff --git a/Sources/LocalData/Services/FileStorageHelper.swift b/Sources/LocalData/Services/FileStorageHelper.swift index 1f47af8..219a332 100644 --- a/Sources/LocalData/Services/FileStorageHelper.swift +++ b/Sources/LocalData/Services/FileStorageHelper.swift @@ -2,7 +2,7 @@ import Foundation /// Actor that handles all file system operations. /// Provides thread-safe file reading, writing, and deletion. -public actor FileStorageHelper { +actor FileStorageHelper { public static let shared = FileStorageHelper() diff --git a/Sources/LocalData/Services/KeychainHelper.swift b/Sources/LocalData/Services/KeychainHelper.swift index 9214331..04976fa 100644 --- a/Sources/LocalData/Services/KeychainHelper.swift +++ b/Sources/LocalData/Services/KeychainHelper.swift @@ -3,7 +3,7 @@ import Security /// Actor that handles all Keychain operations in isolation. /// Provides thread-safe access to the iOS/watchOS Keychain. -public actor KeychainHelper { +actor KeychainHelper { public static let shared = KeychainHelper() diff --git a/Sources/LocalData/Services/StorageRouter.swift b/Sources/LocalData/Services/StorageRouter.swift index f7d9806..c555e13 100644 --- a/Sources/LocalData/Services/StorageRouter.swift +++ b/Sources/LocalData/Services/StorageRouter.swift @@ -10,6 +10,16 @@ public actor StorageRouter: StorageProviding { public static let shared = StorageRouter() private init() {} + + // MARK: - Key Material Providers + + /// Registers a key material provider for external encryption policies. + public func registerKeyMaterialProvider( + _ provider: any KeyMaterialProviding, + for source: KeyMaterialSource + ) async { + await EncryptionHelper.shared.registerKeyMaterialProvider(provider, for: source) + } // MARK: - StorageProviding Implementation diff --git a/Sources/LocalData/Services/SyncHelper.swift b/Sources/LocalData/Services/SyncHelper.swift index d99f4b8..2230f27 100644 --- a/Sources/LocalData/Services/SyncHelper.swift +++ b/Sources/LocalData/Services/SyncHelper.swift @@ -5,7 +5,7 @@ import WatchConnectivity /// Actor that handles WatchConnectivity sync operations. /// Manages data synchronization between iPhone and Apple Watch. -public actor SyncHelper { +actor SyncHelper { public static let shared = SyncHelper() diff --git a/Sources/LocalData/Services/UserDefaultsHelper.swift b/Sources/LocalData/Services/UserDefaultsHelper.swift index 5e820a0..81a4c85 100644 --- a/Sources/LocalData/Services/UserDefaultsHelper.swift +++ b/Sources/LocalData/Services/UserDefaultsHelper.swift @@ -2,7 +2,7 @@ import Foundation /// Actor that handles all UserDefaults operations. /// Provides thread-safe access to UserDefaults with suite support. -public actor UserDefaultsHelper { +actor UserDefaultsHelper { public static let shared = UserDefaultsHelper()