moved to new repo

This commit is contained in:
wukko
2022-07-09 00:17:56 +06:00
committed by GitHub
parent 1decab4daf
commit 94acf10e9e
62 changed files with 2187 additions and 4 deletions

11
modules/sub/crypto.js Normal file
View File

@@ -0,0 +1,11 @@
import { createHmac, createHash, randomUUID } from "crypto";
export function encrypt(str, salt) {
return createHmac("sha256", salt).update(str).digest("hex");
}
export function md5(string) {
return createHash('md5').update(string).digest('hex');
}
export function UUID() {
return randomUUID();
}