mirror of
https://github.com/LingChair/LingChair-V0.git
synced 2025-12-08 01:55:50 +08:00
chore: init
This commit is contained in:
16
server_src/hashlib.js
Normal file
16
server_src/hashlib.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* ©2024 满月叶
|
||||
* Github: MoonLeeeaf
|
||||
* 哈希辅助类
|
||||
*/
|
||||
|
||||
const crypto = require("crypto")
|
||||
|
||||
let apis = {
|
||||
sha256: (data) => crypto.createHash("sha256").update(data).digest("base64"),
|
||||
md5: (data) => crypto.createHash("md5").update(data).digest("base64"),
|
||||
sha256hex: (data) => crypto.createHash("sha256").update(data).digest("hex"),
|
||||
md5hex: (data) => crypto.createHash("md5").update(data).digest("hex"),
|
||||
}
|
||||
|
||||
module.exports = apis
|
||||
Reference in New Issue
Block a user