com.intel.crypto
Class Random
java.lang.Objectcom.intel.crypto.Random
public final class Random
- extends java.lang.Object
This class represents a Random Number Generator that generates a variable number of random bytes.
Method Summary | |
---|---|
static void |
getRandomBytes(byte[] destinationArray,
short destinationIndex,
short destinationLength)
Fills the provided array with random data. |
Methods inherited from class java.lang.Object |
---|
equals, hashCode, toString |
Method Detail |
---|
getRandomBytes
public static final void getRandomBytes(byte[] destinationArray, short destinationIndex, short destinationLength) throws CryptoException
- Fills the provided array with random data.
The random data is generated using a cryptographically secure Pseudo Random
Number Generator.
- Parameters:
destinationArray
- the array to fill with random bytesdestinationIndex
- index in the output arraydestinationLength
- number of bytes to generate- Throws:
IllegalParameterException
- if the requested number of random bytes is illegal.CryptoException