|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensaml.common.impl.SecureRandomIdentifierGenerator
public class SecureRandomIdentifierGenerator
Generates identifiers using random data obtained from a SecureRandom instance.
| Field Summary | |
|---|---|
private static SecureRandom |
random
Random number generator. |
| Constructor Summary | |
|---|---|
SecureRandomIdentifierGenerator()
Constructor. |
|
SecureRandomIdentifierGenerator(String algorithm)
Constructor. |
|
| Method Summary | |
|---|---|
String |
generateIdentifier()
Generates a 16 byte identifier. |
String |
generateIdentifier(int size)
Generates a random identifier. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static SecureRandom random
| Constructor Detail |
|---|
public SecureRandomIdentifierGenerator()
throws NoSuchAlgorithmException
NoSuchAlgorithmException - thrown if the SHA1PRNG algorithm is not supported by the JVM
public SecureRandomIdentifierGenerator(String algorithm)
throws NoSuchAlgorithmException
algorithm - the random number generation algorithm to use
NoSuchAlgorithmException - thrown if the algorithm is not supported by the JVM| Method Detail |
|---|
public String generateIdentifier()
generateIdentifier in interface IdentifierGeneratorpublic String generateIdentifier(int size)
generateIdentifier in interface IdentifierGeneratorsize - number of bytes in the identifier
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||