                 }
             }
             
-            if let accessible = attributes[kSecAttrAccessible as String] as? String {
+            if let accessible = attributes[AttributeAccessible] as? String {
                 if let accessibility = Accessibility(rawValue: accessible) {
                     item["accessibility"] = accessibility.description
                 }
             }
-            if let synchronizable = attributes[kSecAttrSynchronizable as String] as? Bool {
+            if let synchronizable = attributes[AttributeSynchronizable] as? Bool {
                 item["synchronizable"] = synchronizable ? "true" : "false"
             }
 

        
        if key != nil {
            attributes = query()
            attributes[kSecAttrAccount as String] = key
        } else {
            attributes = [String: AnyObject]()
        }
        
        attributes[kSecValueData as String] = value
        
        if label != nil {
            attributes[kSecAttrLabel as String] = label
        }
        if comment != nil {
            attributes[kSecAttrComment as String] = comment
        }

        if let policy = authenticationPolicy {

    
    public class func allKeys(itemClass: ItemClass) -> [(String, String)] {
        var query = [String: AnyObject]()
        query[Class] = itemClass.rawValue
        query[AttributeSynchronizable] = SynchronizableAny
        query[MatchLimit] = MatchLimitAll
        query[ReturnAttributes] = true
        
        var result: AnyObject?
        let status = withUnsafeMutablePointer(&result) { SecItemCopyMatching(query, UnsafeMutablePointer($0)) }
