Interface CryptoRandom
- All Superinterfaces:
AutoCloseable, Closeable
- All Known Implementing Classes:
JavaCryptoRandom, OpenSslCryptoRandom, OpenSslJnaCryptoRandom, OsCryptoRandom
Generates random bytes.
Note that implementations must provide a constructor that takes a Properties instance.
-
Method Summary
Modifier and TypeMethodDescriptionvoidnextBytes(byte[] bytes) Generates random bytes and places them into a user-supplied byte array.
-
Method Details
-
nextBytes
void nextBytes(byte[] bytes) Generates random bytes and places them into a user-supplied byte array. The number of random bytes produced is equal to the length of the byte array.- Parameters:
bytes- the byte array to fill with random bytes
-