File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,6 @@ internal struct KeychainItem {
44
44
45
45
public enum KeychainError : Error {
46
46
case noPassword
47
- case unexpectedPasswordData
48
47
case unexpectedItemData
49
48
case unhandledError
50
49
}
@@ -92,15 +91,15 @@ internal struct KeychainItem {
92
91
guard let existingItem = queryResult as? [ String : AnyObject ] ,
93
92
let passwordData = existingItem [ kSecValueData as String ] as? Data
94
93
else {
95
- throw KeychainError . unexpectedPasswordData
94
+ throw KeychainError . noPassword
96
95
}
97
96
98
97
return passwordData
99
98
}
100
99
101
100
public func readItem( ) throws -> String {
102
101
guard let password = String ( data: try readItemData ( ) , encoding: String . Encoding. utf8) else {
103
- throw KeychainError . unexpectedPasswordData
102
+ throw KeychainError . noPassword
104
103
}
105
104
return password
106
105
}
You can’t perform that action at this time.
0 commit comments