2016-11-27 15:46:42 +00:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
var CryptoJS = require('crypto-js');
|
|
|
|
|
|
|
|
exports.hmacSha3 = function(msg, key) {
|
|
|
|
var wamsg = CryptoJS.enc.Utf8.parse(msg);
|
|
|
|
var wakey = CryptoJS.enc.Utf8.parse(key);
|
|
|
|
var hmac = CryptoJS.HmacSHA3(wamsg, wakey);
|
|
|
|
return hmac.toString();
|
|
|
|
}
|
2016-11-30 20:22:35 +00:00
|
|
|
|
|
|
|
exports.setLocation = function(newLoc) {
|
|
|
|
window.location = newloc;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.getAttr = function(attr) {
|
|
|
|
return function(ob) {
|
|
|
|
return function() {
|
|
|
|
ob.attr(attr);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|