pkcs1 err

This commit is contained in:
2026-02-25 21:40:35 -06:00
parent f8639c9eee
commit cf16c8af49
2 changed files with 10 additions and 2 deletions
@@ -7,7 +7,11 @@ export const generateSecureValue = (content: string) => {
const hash = Password.hash(content);
// Parse the PKCS#1 PEM key into a proper KeyObject
const publicKey = crypto.createPublicKey(secureValuesPublicKey);
const publicKey = crypto.createPublicKey({
key: secureValuesPublicKey,
format: "pem",
type: "pkcs1",
});
// Encrypt the content using the .secureValues.pub public key
const encrypted = crypto.publicEncrypt(