| java.lang.Object com.sun.midp.crypto.SecureRandom com.sun.midp.crypto.PRand
PRand | final class PRand extends SecureRandom (Code) | | Implements a pseudo random number generator.
|
Constructor Summary | |
public | PRand() Constructor for random data. |
Method Summary | |
public void | nextBytes(byte[] b, int off, int len) This does a reasonable job of producing unpredictable
random data by using a one way hash as a mixing function and
the current time in milliseconds as a source of entropy. | public void | setSeed(byte[] b, int off, int len) Set the random number seed. |
PRand | public PRand()(Code) | | Constructor for random data.
|
nextBytes | public void nextBytes(byte[] b, int off, int len)(Code) | | This does a reasonable job of producing unpredictable
random data by using a one way hash as a mixing function and
the current time in milliseconds as a source of entropy.
Parameters: b - buffer of input data Parameters: off - offset into the provided buffer Parameters: len - length of the data to be processed |
setSeed | public void setSeed(byte[] b, int off, int len)(Code) | | Set the random number seed.
Parameters: b - initial data to use as the seed Parameters: off - offset into the provided buffer Parameters: len - length of the data to be used |
Fields inherited from com.sun.midp.crypto.SecureRandom | final public static byte ALG_PSEUDO_RANDOM(Code)(Java Doc) final public static byte ALG_SECURE_RANDOM(Code)(Java Doc)
|
|
|