shellphone.app/lib/utils/hkdf.ts

8 lines
178 B
TypeScript
Raw Normal View History

2021-07-18 15:32:45 +00:00
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" });
}