     
     private let apiKeyID: String
     private let pathToPEM: String
+    private lazy var privateKey: SecKey = {
+        var importedItems: CFArray?
+
+        let pemData = try! Data(contentsOf: URL(fileURLWithPath: self.pathToPEM))
+        let err = SecItemImport(
+            pemData as CFData,
+            "pem" as CFString,
+            nil,
+            nil,
+            [],
+            nil,
+            nil,
+            &importedItems
+        )
+        assert(err == errSecSuccess)
+        
+        let importedKeys = importedItems as! [SecKeychainItem]
+        assert(importedKeys.count == 1)
+        return (importedKeys[0] as AnyObject as! SecKey)
+    }()
     
     public init(apiKeyID: String, pathToPEM: String) {
         self.apiKeyID = apiKeyID

        return last.dataFromHexadecimalString()!.base64EncodedString()
    }
    
    private func hash(of body: Data) -> String {
        let sha256Data = sha256(data: body)
        return sha256Data.base64EncodedString()

        
        return sig
    }

    // Inspired by https://github.com/ooper-shlab/CryptoCompatibility-Swift
    private func signature(of string: String) -> String {
        if #available(OSX 10.12, *) {
            return createSignature(of: string)
        } else {
            // Fallback on earlier versions
        }

        let fileName = "signed.txt"
        do {
            try FileManager.default.removeItem(atPath: fileName)
