[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iaik-jce] Secure random #'s.



Hello, everyone.
Would something like the following bit of code be a good way of
seeding/using a PRNG?

	    // seed the PRNG
	    Random random = new AnsiRandom();
            byte[] seed = new byte[64];
            random.nextBytes(seed);
            
            MetaSeedGenerator.setSeed(seed);
            SeedGenerator.setDefault(MetaSeedGenerator.class);
	    
	    // elsewhere in code, where a SecureRandom is required
	    ... new AnsiRandom() ...

Is the above a good way of doing this, or am I missing something
important? (I've not had much experience with security so far, so I
want to be sure I'm doing this right).
Thanks!
-Vadim G.

--
Mailinglist-archive at http://jcewww.iaik.at/mailarchive/iaik-jce/jcethreads.html

To unsubscribe send an email to listserv@iaik.at with the folowing content: UNSUBSCRIBE iaik-jce