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

Add RSA key parameter support #315

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

AleksaMCode
Copy link

@AleksaMCode AleksaMCode commented Sep 21, 2024

As the JSEncryptRSAKey already supported the usage of key objects in its constructor ({ n: parseBigInt("nValue", 16), e: parseInt("eValue", 16), };), it only made sense to change JSEncrypt to allow usage of said key objects with parameters as well.

Closes #146
Closes #212

* - default_key_size {number} default: 1024 the key size in bit
* - default_public_exponent {string} default: '010001' the hexadecimal representation of the public exponent
* - log {boolean} default: false whether log warn/error or not
* @constructor
*/
export class JSEncrypt {
constructor(options: IJSEncryptOptions = {}) {
options = options || {};
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this as it was redundant due to the utilization of the default parameter.

@AleksaMCode AleksaMCode marked this pull request as ready for review January 1, 2025 16:28
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.

Encrypt using exponent and modulus key Public key from Modulus and Exponent
1 participant