shellphone.app/lib/utils/hkdf.ts
2021-07-18 23:33:08 +08:00

8 lines
178 B
TypeScript

import hkdf from "futoin-hkdf";
const BYTE_LENGTH = 32;
export function encryption(secret: string) {
return hkdf(secret, BYTE_LENGTH, { info: "JWE CEK", hash: "SHA-256" });
}