...
|
...
|
@@ -14,8 +14,8 @@ const getTimestamp = function() { |
|
|
return parseInt(unixtimeMs / 1000, 10);
|
|
|
};
|
|
|
|
|
|
module.exports = function(str, operation, key, expiry) {
|
|
|
operation = operation ? operation : 'encode';
|
|
|
module.exports = function(str, key, expiry, operation) {
|
|
|
operation = operation ? operation : 'decode';
|
|
|
key = key ? key : '';
|
|
|
expiry = expiry ? expiry : 0;
|
|
|
let tmpstr, tmp;
|
...
|
...
|
@@ -115,5 +115,3 @@ module.exports = function(str, operation, key, expiry) { |
|
|
|
|
|
return s;
|
|
|
}; |
|
|
|
|
|
// console.log(module.exports('abcdef123', 'encode', 'key123', 99)) |
...
|
...
|
|