이전 util 이전

This commit is contained in:
2023-08-05 15:34:26 +00:00
parent 5ba073c125
commit 8130c731e0
37 changed files with 72 additions and 694 deletions
+11
View File
@@ -0,0 +1,11 @@
import { webcrypto } from "node:crypto";
const subtle = webcrypto.subtle;
export async function sha256(msg: ArrayBuffer): Promise<ArrayBuffer>{
return await subtle.digest('SHA-256', msg);
}
export async function sha512(msg: ArrayBuffer): Promise<ArrayBuffer>{
return await subtle.digest('SHA-512', msg);
}