|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.atlassian.security.random.DefaultSecureTokenGenerator
public final class DefaultSecureTokenGenerator
Implementation of SecureTokenGenerator which uses the DefaultSecureRandomService
for random byte generation.
| Method Summary | |
|---|---|
java.lang.String |
generateToken()
Generates a hexadecimal String representation of 20 random bytes,
produced by DefaultSecureRandomService.nextBytes(byte[]). |
static SecureTokenGenerator |
getInstance()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static SecureTokenGenerator getInstance()
DefaultSecureTokenGenerator instance.public java.lang.String generateToken()
String representation of 20 random bytes,
produced by DefaultSecureRandomService.nextBytes(byte[]).
The generated String is 40 characters in length and is composed of
characters in the range '0'-'9' and 'a'-'f'.
The length (20 bytes / 160 bits) was selected as it is the same as the size
of the internal state of the SHA1PRNG.
generateToken in interface SecureTokenGeneratorgenerateToken()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||