pkcs1 err
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user