mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
add some type magic
This commit is contained in:
1 parent
2344a41816
commit
a4d7dc4b04
6 files changed
+23
-23
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user