|
Oracle Security Developer Tools Crypto Java API Reference 10g (10.1.4.0.1) B28171-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.crypto.core.EntropySource
oracle.security.crypto.core.SREntropySource
An implementation of the EntropySource
abstract class that wraps the generateSeed(int)
or getSeed(int)
method of the java.security.SecureRandom
class.
If the generateSeed(int)
method is available, it will be used to generate entropic bytes, otherwise the static getSeed(int)
method will be used. This is done as an accomodation for older JDK's that did not support the generateSeed(int)
instance method.
Constructor Summary | |
SREntropySource() Creates a new SREntropySource instance that wraps a java.security.SecureRandom instance that was obtained by making a call to new java.lang.Securerandom() . |
|
SREntropySource(java.security.SecureRandom random) Creates a new SREntropySource instance that wraps the given java.security.SecureRandom instance. |
Method Summary | |
void |
clear() This method has no effect on the underlying java.security.SecureRandom instance. |
byte |
generateByte() Generates a byte of seeding material using the SecureRandom.generateSeed(int) or SecureRandom.getSeed(int) method depending on whether generateSeed(int) is available. |
byte[] |
generateBytes(byte[] bytes) Supplies the requisite number of bytes by calling SecureRandom.generateSeed(int) or SecureRandom.getSeed(int) method depending on whether generateSeed(int) is available, and copying the resulting bytes into the given array. |
Methods inherited from class oracle.security.crypto.core.EntropySource |
getDefault, setDefault |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SREntropySource()
new java.lang.Securerandom()
.
If the generateSeed(int)
method is available, it will be used to generate entropic bytes, otherwise the static getSeed(int)
method will be used. This is done as an accomodation for older JDK's that did not support the generateSeed(int)
instance method.
public SREntropySource(java.security.SecureRandom random)
If the generateSeed(int)
method is available, it will be used to generate entropic bytes, otherwise the static getSeed(int)
method will be used. This is done as an accomodation for older JDK's that did not support the generateSeed(int)
instance method.
Method Detail |
public byte generateByte()
SecureRandom.generateSeed(int)
or SecureRandom.getSeed(int)
method depending on whether generateSeed(int)
is available.generateByte
in class EntropySource
public void clear()
java.security.SecureRandom
instance.clear
in class EntropySource
public byte[] generateBytes(byte[] bytes)
SecureRandom.generateSeed(int)
or SecureRandom.getSeed(int)
method depending on whether generateSeed(int)
is available, and copying the resulting bytes into the given array.generateBytes
in class EntropySource
|
Oracle Security Developer Tools Crypto Java API Reference 10g (10.1.4.0.1) B28171-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |