All Downloads are FREE. Search and download functionalities are using the official Maven repository.

crypto.Random Maven / Gradle / Ivy

Go to download

A simple fast encryption library for the JVM uses standard best practices and standard JVM classes

There is a newer version: 1.1.0
Show newest version
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