mirror of
https://github.com/LingChair/LingChair-V0.git
synced 2025-12-07 17:45:49 +08:00
rebase
This commit is contained in:
@@ -12,7 +12,7 @@ const users = require("./api-users")
|
||||
let getSameHashedValue = (a, b) => {
|
||||
let _a = [hash.md5(a) + hash.sha256(a), hash.md5(b) + hash.sha256(b)].sort()
|
||||
let [_1, _2] = _a
|
||||
return hash.sha256hex(hash.sha256hex(_1) + hash.sha256hex(_2))
|
||||
return hash.sha256(hash.sha256(_1) + hash.sha256(_2))
|
||||
}
|
||||
|
||||
let getSingleChatDir = (a, b) => {
|
||||
|
||||
@@ -7,10 +7,8 @@
|
||||
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"),
|
||||
sha256: (data) => crypto.createHash("sha256").update(data).digest("hex"),
|
||||
md5: (data) => crypto.createHash("md5").update(data).digest("hex"),
|
||||
}
|
||||
|
||||
module.exports = apis
|
||||
|
||||
Reference in New Issue
Block a user