fix: Pubkey(point) and Privkey(bn)

This commit is contained in:
Ryan X. Charles 2014-09-02 12:07:18 -07:00
parent caf6c87419
commit 073ee0a0e4
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ var Random = require('./random');
var Privkey = function Privkey(bn) {
if (!(this instanceof Privkey))
return new Privkey(obj);
return new Privkey(bn);
if (bn instanceof BN)
this.bn = bn;
else if (bn) {

View File

@ -4,7 +4,7 @@ var privkey = require('./privkey');
var Pubkey = function Pubkey(point) {
if (!(this instanceof Pubkey))
return new Pubkey(obj);
return new Pubkey(point);
if (point instanceof Point)
this.point = point;
else if (point) {