Skip to content

Commit

Permalink
- rsa2.js
Browse files Browse the repository at this point in the history
  • Loading branch information
dpronin committed Dec 18, 2017
1 parent 6a8eaad commit 2269412
Show file tree
Hide file tree
Showing 5 changed files with 269 additions and 259 deletions.
6 changes: 3 additions & 3 deletions lib/jsbn/jsbn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class BigInteger {

// BigInteger.prototype.modPowInt = bnModPowInt;
// (public) this^e % m, 0 <= e < 2^32
protected modPowInt(e,m) {
public modPowInt(e,m) {
var z;
if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m);
return this.exp(e,z);
Expand Down Expand Up @@ -153,7 +153,7 @@ export class BigInteger {

// BigInteger.prototype.toByteArray = bnToByteArray;
// (public) convert to bigendian byte array
protected toByteArray() {
public toByteArray() {
var i = this.t, r = new Array();
r[0] = this.s;
var p = this.DB-(i*this.DB)%8, d, k = 0;
Expand Down Expand Up @@ -376,7 +376,7 @@ export class BigInteger {

// BigInteger.prototype.modInverse = bnModInverse;
// (public) 1/this % m (HAC 14.61)
protected modInverse(m) {
public modInverse(m) {
var ac = m.isEven();
if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;
var u = m.clone(), v = this.clone();
Expand Down
117 changes: 0 additions & 117 deletions lib/jsbn/rsa.js

This file was deleted.

Loading

0 comments on commit 2269412

Please sign in to comment.