         for chunk in BytesSequence(chunkSize: chunkSizeBytes, data: tmpMessage) {
             // break chunk into sixteen 32-bit words M[j], 0 ≤ j ≤ 15, big-endian
             // Extend the sixteen 32-bit words into sixty-four 32-bit words:
-            var M:[UInt32] = [UInt32](count: variant.k.count, repeatedValue: 0)
+            var M:[UInt32] = [UInt32](count: self.k.count, repeatedValue: 0)
             for x in 0..<M.count {
                 switch (x) {
                 case 0...15:

        
        // hash values
        var hh = [UInt32]()
        variant.h.forEach {(h) -> () in
            hh.append(UInt32(h))
        }
        

class HMAC {
    
    class func calculateHash(bytes bytes:[UInt8]) -> [UInt8]? {
        let sha = SHA2()
        sha.message = bytes
        return sha.calculate32()
    }
    
