SessionIdGenerator that uses a secure random to generate a
session ID.
On some systems this may perform poorly if not enough entropy is available,
depending on the algorithm in use.
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private volatile int | |
| private final SecureRandom | |
| private static final char[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| private char[] | Returns: the encoded StringThe bytes you want to encode data)Encode the bytes into a String with a slightly modified Base64-algorithm This code was written by Kevin Kelley <[email protected]> and adapted by Thomas Peuss <[email protected]> |
| public int | |
| public void |
| ALPHABET_PROPERTY | back to summary |
|---|---|
| private static final String ALPHABET_PROPERTY | |
| length | back to summary |
|---|---|
| private volatile int length | |
| random | back to summary |
|---|---|
| private final SecureRandom random | |
| SESSION_ID_ALPHABET | back to summary |
|---|---|
| private static final char[] SESSION_ID_ALPHABET | |
| SecureRandomSessionIdGenerator | back to summary |
|---|---|
| public SecureRandomSessionIdGenerator() | |
| createSessionId | back to summary |
|---|---|
| public String createSessionId() Implements io.
| |
| encode | back to summary |
|---|---|
| private char[] encode(byte[] data) Encode the bytes into a String with a slightly modified Base64-algorithm
This code was written by Kevin Kelley The bytes you want to encode
the encoded String
| |
| getLength | back to summary |
|---|---|
| public int getLength() | |
| setLength | back to summary |
|---|---|
| public void setLength(final int length) | |