File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change
1
+ .DS_Store
1
2
.idea
2
3
node_modules /
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " node-rsa" ,
3
- "version" : " 0.0.1 " ,
3
+ "version" : " 0.1.3 " ,
4
4
"description" : " Node.js RSA library" ,
5
- "main" : " dist/nodersa .js" ,
5
+ "main" : " src/NodeRSA .js" ,
6
6
"scripts" : {
7
- "test" : " grunt test" ,
8
- "install" : " grunt"
7
+ "test" : " grunt test"
9
8
},
10
9
"repository" : {
11
10
"type" : " git" ,
Original file line number Diff line number Diff line change @@ -218,6 +218,8 @@ module.exports = (function() {
218
218
*/
219
219
NodeRSA . prototype . decrypt = function ( buffer , encoding ) {
220
220
encoding = encoding || 'utf8' ;
221
+
222
+ buffer = _ . isString ( buffer ) ? new Buffer ( buffer , 'base64' ) : buffer ;
221
223
var res = this . keyPair . decrypt ( buffer ) ;
222
224
223
225
if ( encoding == 'buffer' ) {
You can’t perform that action at this time.
0 commit comments