import Foundation /// Protocol defining the interface for Keychain operations. /// /// Conformers enable dependency injection and mocking in tests. public protocol KeychainStoring: Sendable { /// Stores data for a keychain entry. func set( _ data: Data, service: String, key: String, accessibility: KeychainAccessibility, accessControl: KeychainAccessControl? ) async throws /// Retrieves data for a keychain entry. func get(service: String, key: String) async throws -> Data? /// Deletes a keychain entry. func delete(service: String, key: String) async throws /// Checks if a keychain entry exists. func exists(service: String, key: String) async throws -> Bool /// Deletes all keychain entries for a service. func deleteAll(service: String) async throws }