This commit is contained in:
aozhiwei 2023-07-13 16:39:29 +08:00
parent 579d7de1c2
commit 90bc1d4fe9

View File

@ -205,6 +205,11 @@ function md5Str(data) {
return hash.update(data).digest('hex');
}
function sha1Str(data) {
const hash = crypto.createHash('sha1');
return hash.update(data).digest('hex');
}
function getVal(obj, key, defVal = null) {
if (!obj){
return val;
@ -360,6 +365,7 @@ exports.extractRegisterTime = extractRegisterTime;
exports.createSessionId = createSessionId;
exports.isValidSessionId = isValidSessionId;
exports.md5Str = md5Str;
exports.sha1Str = sha1Str;
exports.getVal = getVal;
exports.excelToJson = excelToJson;
exports.getArgv = getArgv;