         public var kSecAttrIsPermanent : Bool? // NSNumber bool
         private let kSecAttrIsPermanentKey = "perm"
         private func kSecAttrIsPermanentAddToDic(dic : NSMutableDictionary) {
-            if kSecAttrIsPermanent {
+            if (kSecAttrIsPermanent != nil && kSecAttrIsPermanent!) {
                 dic.setObject(NSNumber(bool: true), forKey: kSecAttrIsPermanentKey)
             }
         }

        
        public var kSecAttrApplicationTag : NSData?
        private let kSecAttrApplicationTagKey = "atag"
         private func kSecAttrApplicationTagAddToDic(dic : NSMutableDictionary) {
            if let v = kSecAttrApplicationTag {
                dic.setObject(v, forKey: kSecAttrApplicationTagKey)
            }

        public var kSecAttrCanDecrypt : Bool? // NSNumber
        private let kSecAttrCanDecryptKey = "decr" 
        private func kSecAttrCanDecryptAddToDic(dic : NSMutableDictionary) {
            if kSecAttrCanDecrypt != nil && kSecAttrCanDecrypt! {
                dic.setObject(NSNumber(bool: true), forKey: kSecAttrCanDecryptKey)
            }
        }
        
        public var kSecAttrCanDerive : Bool? // NSNumber
        private let kSecAttrCanDeriveKey = "drve" 
        private func kSecAttrCanDeriveAddToDic(dic : NSMutableDictionary) {
            if kSecAttrCanDerive != nil && kSecAttrCanDerive! {
                dic.setObject(NSNumber(bool: true), forKey: kSecAttrCanDeriveKey)
            }
        }
