@Override public synchronized void setField(Field f) { super.setField(f); mask = BigInteger.ONE.shiftLeft(f.getb()-1).subtract(BigInteger.ONE); }
public Field(int b, byte[] q, Encoding enc) { this.b = b; this.enc = enc; this.enc.setField(this); this.q = fromByteArray(q); // Set up constants ZERO = fromByteArray(Constants.ZERO); ONE = fromByteArray(Constants.ONE); TWO = fromByteArray(Constants.TWO); FOUR = fromByteArray(Constants.FOUR); FIVE = fromByteArray(Constants.FIVE); EIGHT = fromByteArray(Constants.EIGHT); // Precompute values qm2 = this.q.subtract(TWO); qm5d8 = this.q.subtract(FIVE).divide(EIGHT); }
@Override public synchronized void setField(Field f) { super.setField(f); mask = BigInteger.ONE.shiftLeft(f.getb()-1).subtract(BigInteger.ONE); }
public Field(int b, byte[] q, Encoding enc) { this.b = b; this.enc = enc; this.enc.setField(this); this.q = fromByteArray(q); // Set up constants ZERO = fromByteArray(Constants.ZERO); ONE = fromByteArray(Constants.ONE); TWO = fromByteArray(Constants.TWO); FOUR = fromByteArray(Constants.FOUR); FIVE = fromByteArray(Constants.FIVE); EIGHT = fromByteArray(Constants.EIGHT); // Precompute values qm2 = this.q.subtract(TWO); qm5d8 = this.q.subtract(FIVE).divide(EIGHT); }