Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove misspelled and unneeded padding constant. #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dsagal
Copy link
Member

@dsagal dsagal commented Feb 1, 2025

The constant was intended to be crypto.constants.RSA_PKCS1_OAEP_PADDING. Luckily, the misspelling (with "OEAP") caused it to be undefined, and use node-crypto's default, which is already RSA_PKCS1_OAEP_PADDING.

The removal makes the reliance on the default explicit. The default is documented at https://nodejs.org/api/crypto.html#cryptopublicencryptkey-buffer. It is already the recommended value.

The constant was intended to be `crypto.constants.RSA_PKCS1_OAEP_PADDING`.
Luckily, the misspelling (with "OEAP") caused it to be undefined, and
use node-crypto's default, which is already RSA_PKCS1_OAEP_PADDING.

The removal makes the reliance on the default explicit. The default is
documented at https://nodejs.org/api/crypto.html#cryptopublicencryptkey-buffer.
It is already the recommended value.
@dsagal dsagal requested a review from Spoffy February 1, 2025 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant