优化rating计算速度

This commit is contained in:
masnn committed 2020-06-09 13:22:04 +08:00
1 parent 45f1184d68
commit 55912b087d
22 files changed
+309 -178

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
const crypto = require('crypto');
/**
* @param {any} content
* @return {string}
*/
global.Hydro.lib.sha1 = module.exports = (content) => {
const hash = crypto.createHash('sha1');
hash.update(content);
return hash.digest('hex');
};