| java.lang.Object java.security.SecureRandomSpi org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl
SHA1PRNG_SecureRandomImpl | public class SHA1PRNG_SecureRandomImpl extends SecureRandomSpi implements Serializable,SHA1_Data(Code) | | This class extends the SecureRandomSpi class implementing all its abstract methods.
To generate pseudo-random bits, the implementation uses technique described in
the "Random Number Generator (RNG) algorithms" section, Appendix A,
JavaTM Cryptography Architecture, API Specification&Reference
The class implements the Serializable interface.
|
Method Summary | |
protected byte[] | engineGenerateSeed(int numBytes) Returns a required number of random bytes. | protected void | engineNextBytes(byte[] bytes) Writes random bytes into an array supplied.
Bits in a byte are from left to right. | protected void | engineSetSeed(byte[] seed) Changes current seed by supplementing a seed argument to the current seed,
if this already set;
the argument is used as first seed otherwise. |
SHA1PRNG_SecureRandomImpl | public SHA1PRNG_SecureRandomImpl()(Code) | | Creates object and sets implementation variables to their initial values
|
engineGenerateSeed | protected byte[] engineGenerateSeed(int numBytes)(Code) | | Returns a required number of random bytes.
The method overrides "engineGenerateSeed (int)" in class SecureRandomSpi.
Parameters: numBytes - - number of bytes to return; should be >= 0.byte array containing bits in order from left to right throws: InvalidParameterException - - if numBytes < 0 |
engineNextBytes | protected void engineNextBytes(byte[] bytes)(Code) | | Writes random bytes into an array supplied.
Bits in a byte are from left to right.
To generate random bytes, the "expansion of source bits" method is used,
that is,
the current seed with a 64-bit counter appended is used to compute new bits.
The counter is incremented by 1 for each 20-byte output.
The method overrides engineNextBytes in class SecureRandomSpi.
Parameters: bytes - - byte array to be filled in with bytes throws: NullPointerException - - if null is passed to the "bytes" argument |
engineSetSeed | protected void engineSetSeed(byte[] seed)(Code) | | Changes current seed by supplementing a seed argument to the current seed,
if this already set;
the argument is used as first seed otherwise.
The method overrides "engineSetSeed(byte[])" in class SecureRandomSpi.
Parameters: seed - - byte array throws: NullPointerException - - if null is passed to the "seed" argument |
Methods inherited from java.security.SecureRandomSpi | abstract protected byte[] engineGenerateSeed(int numBytes)(Code)(Java Doc) abstract protected void engineNextBytes(byte[] bytes)(Code)(Java Doc) abstract protected void engineSetSeed(byte[] seed)(Code)(Java Doc)
|
|
|