@@ -48,7 +48,7 @@ public final class Keychain: Sendable {
4848 /// - Parameters:
4949 /// - data: The data to save.
5050 /// - key: The account identifier.
51- public func save( data: Data , forKey key: String ) throws ( KeychainError) {
51+ public func save( data: Data , forKey key: String ) throws ( KeychainError) {
5252 var query = baseQuery ( forKey: key, forAdding: true )
5353 query [ kSecValueData as String ] = data
5454
@@ -63,7 +63,7 @@ public final class Keychain: Sendable {
6363 ///
6464 /// - Parameter key: The account identifier.
6565 /// - Returns: The data if found, or `nil` if no item exists with this key.
66- public func load( forKey key: String ) throws ( KeychainError) -> Data ? {
66+ public func load( forKey key: String ) throws ( KeychainError) -> Data ? {
6767 var query = baseQuery ( forKey: key, forAdding: false )
6868 query [ kSecReturnData as String ] = true
6969 query [ kSecMatchLimit as String ] = kSecMatchLimitOne
@@ -91,7 +91,7 @@ public final class Keychain: Sendable {
9191 /// - Parameters:
9292 /// - data: The new data to save.
9393 /// - key: The account identifier.
94- public func update( data: Data , forKey key: String ) throws ( KeychainError) {
94+ public func update( data: Data , forKey key: String ) throws ( KeychainError) {
9595 let query = baseQuery ( forKey: key, forAdding: false )
9696 let attributesToUpdate : [ String : Any ] = [
9797 kSecValueData as String : data,
@@ -107,7 +107,7 @@ public final class Keychain: Sendable {
107107 /// Deletes an item from the Keychain for the specified key.
108108 ///
109109 /// - Parameter key: The account identifier.
110- public func delete( forKey key: String ) throws ( KeychainError) {
110+ public func delete( forKey key: String ) throws ( KeychainError) {
111111 let query = baseQuery ( forKey: key, forAdding: false )
112112 let status = SecItemDelete ( query as CFDictionary )
113113
@@ -118,7 +118,7 @@ public final class Keychain: Sendable {
118118 }
119119
120120 /// Deletes all items for this service from the Keychain.
121- public func deleteAll( ) throws ( KeychainError) {
121+ public func deleteAll( ) throws ( KeychainError) {
122122 let query : [ String : Any ] = [
123123 kSecClass as String : kSecClassGenericPassword,
124124 kSecAttrService as String : serviceName,
@@ -134,7 +134,7 @@ public final class Keychain: Sendable {
134134 /// Returns all account identifiers (keys) stored for this service.
135135 ///
136136 /// - Returns: An array of account identifiers.
137- public func allKeys( ) throws ( KeychainError) -> [ String ] {
137+ public func allKeys( ) throws ( KeychainError) -> [ String ] {
138138 let query : [ String : Any ] = [
139139 kSecClass as String : kSecClassGenericPassword,
140140 kSecAttrService as String : serviceName,
@@ -165,7 +165,7 @@ public final class Keychain: Sendable {
165165 ///
166166 /// - Returns: A dictionary where keys are account identifiers and values are
167167 /// the stored data.
168- public func allItems( ) throws ( KeychainError) -> [ String : Data ] {
168+ public func allItems( ) throws ( KeychainError) -> [ String : Data ] {
169169 let query : [ String : Any ] = [
170170 kSecClass as String : kSecClassGenericPassword,
171171 kSecAttrService as String : serviceName,
0 commit comments