public static RAND getRand ( ) { // construct a secure seed int seedLength = IdemixUtils . FIELD_BYTES ; SecureRandom random = new SecureRandom ( ) ; byte [ ] seed = random . generateSeed ( seedLength ) ; // create a new amcl.RAND and initialize it with the generated seed RAND rng = new RAND ( ) ; rng . clean ( ) ; rng . seed ( seedLength , seed ) ; return rng ; }
Returns a random number generator amcl . RAND initialized with a fresh seed .