爱简收旧衣按件回收前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

22 lines
936 B

"use strict";
const utils_ossUpload_common_crypto_crypto_js = require("./crypto.js.js");
(function() {
var util = utils_ossUpload_common_crypto_crypto_js.Crypto.util;
utils_ossUpload_common_crypto_crypto_js.Crypto.HMAC = function(hasher, message, key, options) {
key = key.length > hasher._blocksize * 4 ? hasher(key, {
asBytes: true
}) : util.stringToBytes(key);
var okey = key, ikey = key.slice(0);
for (var i = 0; i < hasher._blocksize * 4; i++) {
okey[i] ^= 92;
ikey[i] ^= 54;
}
var hmacbytes = hasher(util.bytesToString(okey) + hasher(util.bytesToString(ikey) + message, {
asString: true
}), {
asBytes: true
});
return options && options.asBytes ? hmacbytes : options && options.asString ? util.bytesToString(hmacbytes) : util.bytesToHex(hmacbytes);
};
})();
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/utils/oss-upload/common/crypto/hmac.js.map