public static synchronized boolean randomize(byte[] seed) throws AssertFailException {
  Preconditions.checkArgument(seed.length == 32 || seed == null);
  ByteBuffer byteBuff=nativeECDSABuffer.get();
  if (byteBuff == null || byteBuff.capacity() < seed.length) {
    byteBuff=ByteBuffer.allocateDirect(seed.length);
    byteBuff.order(ByteOrder.nativeOrder());
    nativeECDSABuffer.set(byteBuff);
  }
  byteBuff.rewind();
  byteBuff.put(seed);
  w.lock();
  try {
    return secp256k1_context_randomize(byteBuff,Secp256k1Context.getContext()) == 1;
  }
  finally {
    w.unlock();
  }
}

public static synchronized boolean randomize ( byte [ ] seed ) throws AssertFailException { Preconditions . checkArgument ( seed . length == 32 || seed == null ) ; ByteBuffer byteBuff = nativeECDSABuffer . get ( ) ; if ( byteBuff == null || byteBuff . capacity ( ) < seed . length ) { byteBuff = ByteBuffer . allocateDirect ( seed . length ) ; byteBuff . order ( ByteOrder . nativeOrder ( ) ) ; nativeECDSABuffer . set ( byteBuff ) ; } byteBuff . rewind ( ) ; byteBuff . put ( seed ) ; w . lock ( ) ; try { return secp256k1_context_randomize ( byteBuff , Secp256k1Context . getContext ( ) ) == 1 ; } finally { w . unlock ( ) ; } }
libsecp256k1 randomize - updates the context randomization
