优化站内发件无需第三方

This commit is contained in:
eoao
2026-02-07 20:02:01 +08:00
parent 3ea917a572
commit 5da6b44ad6
12 changed files with 238 additions and 193 deletions

View File

@@ -11,7 +11,7 @@ const fileUtils = {
async getBuffHash(buff) {
const hashBuffer = await crypto.subtle.digest('SHA-256', buff);
const hashArray = Array.from(new Uint8Array(hashBuffer));
return hashArray.map(b => b.toString(16).padStart(2, '0')).join('');
return hashArray.slice(0, 16).map(b => b.toString(16).padStart(2, '0')).join('');
},
base64ToDataStr(base64) {