|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--iaik.me.security.SecureRandom
A class to generate secure random bytes. It makes use of the SHA message digest to generate secure pseudo random bytes from an initial true random seed. This true random seed must be provided by the user, either by setting it via addSeed() for a particular SecureRandom instance or by specifying a system default seed via SecureRandom.getSeedGenerator().addSeed(). If a seed has not been set, a warning message is displayed on the system console.
Constructor Summary | |
SecureRandom()
Generate a new random number generator. |
Method Summary | |
void |
addSeed(byte[] newSeed)
Add new entropy to the seed. |
static SecureRandom |
getDefault()
Get a new random number generator of the system default type. |
static SecureRandom |
getSeedGenerator()
Get the system default seed generator. |
byte[] |
nextBytes(byte[] bytes)
Return bytes.length random bytes. |
int |
nextInt()
Return a 32 bit random value as an integer. |
void |
setSeed(byte[] newSeed)
Set the seed to the specified value. |
static void |
setSeedGenerator(SecureRandom random)
Set the system default seed generator. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SecureRandom()
Method Detail |
public static SecureRandom getDefault()
public static SecureRandom getSeedGenerator()
public static void setSeedGenerator(SecureRandom random)
public void setSeed(byte[] newSeed)
public void addSeed(byte[] newSeed)
public byte[] nextBytes(byte[] bytes)
public int nextInt()
|
This Javadoc may contain text parts from IETF Internet Standard specifications, see copyright note) and RSA Data Security Public-Key Cryptography Standards (see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |