优化站内发件无需第三方
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user