             (kSecClass,                kSecClassKey),
             (kSecAttrKeyType,          kSecAttrKeyTypeEC),
             (kSecAttrKeyClass,         kSecAttrKeyClassPublic),
-            (kSecAttrApplicationLabel, h as CFData),
+            (kSecAttrApplicationLabel, appLabel as CFData),
             (kSecReturnData,           kCFBooleanTrue)
         )
 

            return nil
        }

        return sig
    }



    // Delete the keypair from the keychain.
    func delete() -> Bool {
        guard let appLabel = applicationLabel else {
            print("Error getting key handle")
            return false
        }

        let query = makeCFDictionary(
            (kSecClass,                kSecClassKey),
            (kSecAttrApplicationLabel, appLabel as CFData)
        )

        let err = SecItemDelete(query)
