code: function rstr_hmac(key, data) {
          key = (utf8) ? utf8Encode(key) : key;
          data = (utf8) ? utf8Encode(data) : data;
          var hash, i = 0,
            bkey = rstr2binb(key),
            ipad = Array(16),
            opad = Array(16);
  
          if (bkey.length > 16) {
            bkey = binb(bkey, key.length * 8);
          }
  
          for (; i < 16; i += 1) {
            ipad[i] = bkey[i] ^ 0x36363636;
            opad[i] = bkey[i] ^ 0x5C5C5C5C;
          }
  
          hash = binb(ipad.concat(rstr2binb(data)), 512 + data.length * 8);
          return binb2rstr(binb(opad.concat(hash), 512 + 256));
        }
docs: Calculate the HMAC-sha256 of a key and some data (raw strings)