bip70: fix bn.

This commit is contained in:
Christopher Jeffrey 2016-10-18 18:25:17 -07:00
parent 04f071f9b0
commit e35f4aa186
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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');