Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 3, 2024 via pnpm
Package summary
Share
0
issues
1
license
3
MIT
Package created
26 Mar 2014
Version published
22 Jul 2020
Maintainers
1
Total deps
3
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
3 Packages, Including:
asn1@0.2.6
node-rsa@1.1.1
safer-buffer@2.1.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of node-rsa 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
asn10.2.65.84 kBMIT
prod

Visualizations

Frequently Asked Questions

What does node-rsa do?

Node-RSA is a powerful, full-featured RSA library for Node.js. It's based on the jsbn library from Tom Wu. Node-RSA provides pure JavaScript implementation, so there is no need for OpenSSL. Its key features include generating keys, supporting long messages for encryption/decryption, and providing signing and verify functionalities. With Node-RSA, you can effectively carry out encryption/decryption and signing/verifying operations in your Node.js applications.

How do you use node-rsa?

To use node-rsa, begin by installing the npm package using the command npm install node-rsa. Once installed, you can import NodeRSA using const NodeRSA = require('node-rsa');. From there, you can create a new instance and generate a 512bit-length key. For example:

const NodeRSA = require('node-rsa');
const key = new NodeRSA({b: 512});

You can then use this key to encrypt and decrypt messages as follows:

const text = 'Hello RSA!';
const encrypted = key.encrypt(text, 'base64');
console.log('encrypted: ', encrypted);
const decrypted = key.decrypt(encrypted, 'utf8');
console.log('decrypted: ', decrypted);

Node-RSA also allows generating keys from custom parameters, loading keys from PEM strings, importing/exporting key data in several formats, signing/verifying buffers, and more, offering great flexibility for diverse RSA operations.

Where are the node-rsa docs?

The node-rsa documentation can be found in the project's README and GitHub repository. It provides installation instructions, usage examples, and detailed information on different methods, giving you a comprehensive guide on how to leverage the full potential of the Node-RSA library.