예제 #1
0
 public void setSeed(byte[] buffer, short offset, short length) {
   byte[] seed = new byte[length];
   Util.arrayCopyNonAtomic(buffer, offset, seed, (short) 0, length);
   engine.addSeedMaterial(seed);
 }
 @Override
 public void fill(byte[] bytes, int start, int len) {
   random.nextBytes(bytes, start, len);
 }
예제 #3
0
 public void generateData(byte[] buffer, short offset, short length) throws CryptoException {
   engine.nextBytes(buffer, offset, length);
 }
 public BouncyCastleRandom() {
   byte[] seed = new SecureRandom().generateSeed(8);
   random.addSeedMaterial(seed);
 }