add some type magic

This commit is contained in:
undefined committed 2021-03-08 14:32:11 +08:00
1 parent 2344a41816
commit a4d7dc4b04
6 files changed
+23 -23

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ const coll = db.collection('status');
const logger = new Logger('monitor');
function crypt(str: string) {
const cipher = crypto.createCipheriv('des-ecb', 'hydro-oj', '');
const cipher = crypto.createCipheriv('des-ecb', 'hydro-oj', ''); // lgtm [js/hardcoded-credentials]
let encrypted = cipher.update(str, 'utf8', 'hex');
encrypted += cipher.final('hex');
return encrypted;