mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-18 01:36:08 +08:00
11 lines
218 B
TypeScript
11 lines
218 B
TypeScript
import crypto from 'crypto';
|
|
|
|
function sha1(content: string) {
|
|
const hash = crypto.createHash('sha1');
|
|
hash.update(content);
|
|
return hash.digest('hex');
|
|
}
|
|
|
|
global.Hydro.lib.sha1 = sha1;
|
|
export default sha1;
|