             return nil
         }
 
+        if let current = counter {
+            counter = current + 1
+        }
+
         return sig
     }
 

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



        publicKey = pub!
        privateKey = priv!

        counter = 1
    }

    init?(keyHandle kh:Data) {
        let appLabel = unpadKeyHandle(kh) as CFData

        // Lookup public key.
        var query = makeCFDictionary(
            (kSecClass,                kSecClassKey),
            (kSecAttrKeyType,          kSecAttrKeyTypeEC),
            (kSecAttrKeyClass,         kSecAttrKeyClassPublic),
            (kSecAttrApplicationLabel, appLabel),
            (kSecReturnRef,            kCFBooleanTrue)
        )

