com.jcorporate.expresso.core.security.weakencryption
Class RandomNumber
java.lang.Object
com.jcorporate.expresso.core.security.AbstractRandomNumber
com.jcorporate.expresso.core.security.weakencryption.RandomNumber
- public final class RandomNumber
- extends AbstractRandomNumber
Weak version of the Randum Number Generator. This version only uses
the standard PRNG and nothing even close to cryptographic strength.
- Author:
- Michael Rimov
|
Method Summary |
byte[] |
getRandomBytes(int numBytes)
getRandomBytes - Returns a byte array of random bytes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomNumber
public RandomNumber()
throws ChainedException
- Default Constructor
- Throws:
ChainedException - if unable to instantiate the SHA1 Random
number generator
getRandomBytes
public byte[] getRandomBytes(int numBytes)
- getRandomBytes - Returns a byte array of random bytes. The derived
class determines the actual method used for getting the random data.
- Specified by:
getRandomBytes in class AbstractRandomNumber
- Parameters:
numBytes - The number of bytes to retrieve
- Returns:
- An array of random bytes
Please see www.jcorporate.com for information about new Expresso releases.