1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00

fix(node/crypto): Assign publicKey and privateKey with let instead of const (#24943)

Because public/private key are reassigned, they should be `let` instead
of `const`.

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
This commit is contained in:
Birk Skyum 2024-08-08 12:20:16 +02:00 committed by GitHub
parent 6fce23c54e
commit 733162a83e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -573,8 +573,8 @@ export function generateKeyPair(
const privateKeyHandle = op_node_get_private_key_from_pair(pair);
const publicKeyHandle = op_node_get_public_key_from_pair(pair);
const privateKey = new PrivateKeyObject(privateKeyHandle);
const publicKey = new PublicKeyObject(publicKeyHandle);
let privateKey = new PrivateKeyObject(privateKeyHandle);
let publicKey = new PublicKeyObject(publicKeyHandle);
if (typeof options === "object" && options !== null) {
const { publicKeyEncoding, privateKeyEncoding } = options as any;