crypto.Random Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of crypto-core Show documentation
Show all versions of crypto-core Show documentation
A simple fast encryption library for the JVM uses standard best practices and standard JVM classes
package crypto;
import java.security.SecureRandom;
/**
* Helper class that contains a single static instance of SecureRandom.
*
* Secure random is thread safe, thus this class and its functions are thread safe.
*
*/
public class Random {
public static final SecureRandom secureRandom = new SecureRandom();
/**
* Fill the bytes from SecureRandom.
*/
public static final void nextBytes(byte[] bts) {
secureRandom.nextBytes(bts);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy