Methods Summary |
---|
public static com.sun.midp.crypto.SecureRandom | getInstance(byte alg)Creates a RandomData instance of the selected algorithm.
WARNING: Requests for a secure random number generator
are currently redirected to a class that implements a weakly
unpredictable source of random data. Licensees of this reference
implementation are strongly urged to link requests for
ALG_SECURE_RANDOM to better generators that may be available
on their specific platforms.
switch (alg) {
case ALG_SECURE_RANDOM:
// return (new SRand());
case ALG_PSEUDO_RANDOM:
return (new PRand());
default:
throw new NoSuchAlgorithmException();
}
|
public abstract void | nextBytes(byte[] buf, int off, int len)Generates the next bytes of random data.
|
public abstract void | setSeed(byte[] buf, int off, int len)Seeds the random number generator.
|