bip70: fix bn.
This commit is contained in:
parent
04f071f9b0
commit
e35f4aa186
@ -99,7 +99,7 @@ rsa.decrypt = function decrypt(N, D, m) {
|
||||
throw new Error('Cannot decrypt.');
|
||||
|
||||
return c
|
||||
.toRed(bn.red(N))
|
||||
.toRed(BN.red(N))
|
||||
.redPow(D)
|
||||
.fromRed()
|
||||
.toArrayLike(Buffer, 'be');
|
||||
@ -107,7 +107,7 @@ rsa.decrypt = function decrypt(N, D, m) {
|
||||
|
||||
rsa.encrypt = function encrypt(N, e, m) {
|
||||
return new BN(m)
|
||||
.toRed(bn.red(N))
|
||||
.toRed(BN.red(N))
|
||||
.redPow(e)
|
||||
.fromRed()
|
||||
.toArrayLike(Buffer, 'be');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user