Dart Documentationsolvr:bignumClassic

Classic Class

Modular reduction using "classic" algorithm on BigInteger

Constructors

Code new Classic(BigInteger m) #

Classic(this.m);

Methods

Code convert(x) #

convert(x) {
  if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m);
  else return x;
}

Code mulTo(x, y, r) #

mulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }

Code reduce(x) #

reduce(x) { x.divRemTo(this.m,null,x); }

Code revert(x) #

revert(x) { return x; }

Code sqrTo(x, r) #

sqrTo(x,r) { x.squareTo(r); this.reduce(r); }

Fields

Code BigInteger m #

BigInteger m;