Example usage for org.bouncycastle.math.ec ECConstants ZERO

List of usage examples for org.bouncycastle.math.ec ECConstants ZERO

Introduction

In this page you can find the example usage for org.bouncycastle.math.ec ECConstants ZERO.

Prototype

BigInteger ZERO

To view the source code for org.bouncycastle.math.ec ECConstants ZERO.

Click Source Link

Usage

From source file:org.cryptoworkshop.ximix.node.mixnet.transform.MultiColumnRowTransform.java

License:Apache License

private BigInteger generateK(BigInteger n, SecureRandom random) {
    int nBitLength = n.bitLength();
    BigInteger k = new BigInteger(nBitLength, random);

    while (k.equals(ECConstants.ZERO) || (k.compareTo(n) >= 0)) {
        k = new BigInteger(nBitLength, random);
    }//  ww  w  . j  a  v  a  2  s.com

    return k;
}