Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "node-rsa", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Node.js RSA library", | ||
@@ -5,0 +5,0 @@ "main": "src/NodeRSA.js", |
# Node-RSA | ||
Node.js RSA library | ||
Node.js RSA library<br /> | ||
Based on jsbn library from Tom Wu http://www-cs-students.stanford.edu/~tjw/jsbn/ | ||
@@ -53,5 +53,7 @@ | ||
```js | ||
key.generateKeyPair([bits], [exp]); // exp = 65537 by default | ||
key.generateKeyPair([bits], [exp]); | ||
key.loadFromPEM(pem_string); | ||
``` | ||
**bits** - key size in bits. 2048 by default.<br /> | ||
**exp** - public exponent. 65537 by default. | ||
@@ -63,3 +65,3 @@ ### Export keys | ||
``` | ||
* **strict** - if true method will return false if key pair have private exponent. Default *false*. | ||
**strict** - if true method will return false if key pair have private exponent. Default *false*. | ||
@@ -76,5 +78,5 @@ ### Test key | ||
``` | ||
* **buffer** - data for encrypting, may be string, Buffer, or any object/array. Arrays and objects will encoded to JSON string first. | ||
* **source_encoding** - source encoding, works only with string buffer. Can take standard Node.js Buffer encodings (hex, utf8, base64, etc). *Utf8* by default. | ||
* **output_encoding** - encoding for output result, can also take 'buffer' to return Buffer object. Default *base64*. | ||
**buffer** - data for encrypting, may be string, Buffer, or any object/array. Arrays and objects will encoded to JSON string first.<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 /> | ||
**output_encoding** - encoding for output result, can also take 'buffer' to return Buffer object. Default *base64*.<br /> | ||
@@ -85,4 +87,4 @@ ```js | ||
* **buffer** - data for decrypting. Takes Buffer object. | ||
* **encoding** - encoding for result string. Can also take 'buffer' for raw Buffer object, or 'json' for automatic JSON.parse result. | ||
**buffer** - data for decrypting. Takes Buffer object or base64 encoded string.<br /> | ||
**encoding** - encoding for result string. Can also take 'buffer' for raw Buffer object, or 'json' for automatic JSON.parse result.<br /> | ||
@@ -96,4 +98,3 @@ | ||
Copyright (c) 2014 rzcoder | ||
Copyright (c) 2014 rzcoder<br /> | ||
All Rights Reserved. | ||
@@ -105,3 +106,3 @@ | ||
Copyright (c) 2003-2005 Tom Wu | ||
Copyright (c) 2003-2005 Tom Wu<br /> | ||
All Rights Reserved. | ||
@@ -132,2 +133,2 @@ | ||
All redistributions must retain an intact copy of this copyright notice | ||
and disclaimer. | ||
and disclaimer. |
@@ -9,4 +9,2 @@ /** | ||
for(var i=0;i<100;i++) | ||
describe('NodeRSA', function(){ | ||
@@ -13,0 +11,0 @@ var nodeRSA = null; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74361
128
2098