refactor: 重構後端代碼, 換用 Deno

This commit is contained in:
CrescentLeaf
2025-06-15 00:22:53 +08:00
parent 6c225b7bc5
commit d65ead11e1
29 changed files with 362 additions and 15645 deletions

10
server/lib/crypto.ts Normal file
View File

@@ -0,0 +1,10 @@
import crypto from 'node:crypto'
/**
* 获取 Sha-256 Hex 格式哈希
* @param { crypto.BinaryLike } data
* @returns
*/
export function sha256(data) {
return crypto.createHash('sha256').update(data).digest().toString('hex')
}