Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-rsa

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-rsa - npm Package Compare versions

Comparing version 0.1.50 to 0.1.51

2

package.json
{
"name": "node-rsa",
"version": "0.1.50",
"version": "0.1.51",
"description": "Node.js RSA library",

@@ -5,0 +5,0 @@ "main": "src/NodeRSA.js",

@@ -107,3 +107,3 @@ # Node-RSA

**buffer** - data for encrypting, may be string, Buffer, or any object/array. Arrays and objects will encoded to JSON string first.<br/>
**encoding** - encoding for output result, may be `'buffer'`, `'binary'`, `'hex'` or 'base64'. Default `'buffer'`.<br/>
**encoding** - encoding for output result, may be `'buffer'`, `'binary'`, `'hex'` or `'base64'`. Default `'buffer'`.<br/>
**source_encoding** - source encoding, works only with string buffer. Can take standard Node.js Buffer encodings (hex, utf8, base64, etc). `'utf8'` by default.<br/>

@@ -110,0 +110,0 @@

@@ -48,6 +48,6 @@ /*!

bits = bits || 2048;
exp = 65537;
exp = exp || 65537;
if (bits % 2 == 1) {
throw Error('Key size must be even.');
if (bits % 8 !== 0) {
throw Error('Key size must be a multiple of 8.');
}

@@ -54,0 +54,0 @@

@@ -63,3 +63,3 @@ /**

(function(size){
it("should make key pair " + size.b + "-bit length and public exponent is " + (size.e || 65537), function () {
it("should make key pair " + size.b + "-bit length and public exponent is " + (size.e ? size.e : size.e + ' and should be 65537'), function () {
generatedKeys.push(new NodeRSA({b: size.b, e: size.e}));

@@ -69,2 +69,3 @@ assert.instanceOf(generatedKeys[generatedKeys.length - 1].keyPair, Object);

assert.equal(generatedKeys[generatedKeys.length - 1].getMaxMessageSize(), (size.b / 8 - 11));
assert.equal(generatedKeys[generatedKeys.length - 1].keyPair.e, size.e || 65537);
});

@@ -71,0 +72,0 @@ })(keySizes[size]);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc