List of usage examples for org.bouncycastle.crypto.prng.drbg SP80090DRBG generate
int generate(byte[] output, byte[] additionalInput, boolean predictionResistant);
From source file:org.cryptoworkshop.ximix.common.util.challenge.SeededChallenger.java
License:Apache License
private int makePositiveInt(SP80090DRBG drbg) { byte[] bytes = new byte[4]; drbg.generate(bytes, null, false); return ((bytes[0] & 0x7f) << 24) | ((bytes[1] & 0xff) << 16) | ((bytes[2] & 0xff) << 8) | (bytes[3] & 0xff); }