이전 util 이전
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user