java.lang.Object
io.github.astrapi69.random.number.RandomByteFactory
Utility class for producing random primitive byte types
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte
The Method randomByte() selects a random byte.static byte
randomByte
(SecureRandom secureRandom) The Method randomByte() selects a random byte.static byte[]
randomByteArray
(int length) The Method randomByteArray(int) generates a random byte array.static byte[]
randomByteArray
(int length, SecureRandom secureRandom) The Method randomByteArray(int) generates a random byte array.
-
Method Details
-
randomByte
public static byte randomByte()The Method randomByte() selects a random byte.- Returns:
- The random byte.
-
randomByte
The Method randomByte() selects a random byte.- Parameters:
secureRandom
- the secure random for byte generation- Returns:
- The random byte.
-
randomByteArray
public static byte[] randomByteArray(int length) The Method randomByteArray(int) generates a random byte array.- Parameters:
length
- the length.- Returns:
- the byte[]
-
randomByteArray
The Method randomByteArray(int) generates a random byte array.- Parameters:
length
- the lengthsecureRandom
- the secure random for byte generation- Returns:
- the byte[]
-