类 SecureRandomSessionIdGenerator
java.lang.Object
cn.taketoday.session.SecureRandomSessionIdGenerator
- 所有已实现的接口:
SessionIdGenerator
A
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.- 从以下版本开始:
- 4.0 2022/4/30 23:29
- 作者:
- Harry Yang
-
字段概要
字段修饰符和类型字段说明private static final Stringprivate intprivate final SecureRandomprivate static final char[] -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private char[]encode(byte[] data) Encode the bytes into a String with a slightly modified Base64-algorithm This code was written by Kevin Kelleykelley@ruralnet.netand adapted by Thomas Peussjboss@peuss.deGenerate a new identifier.voidsetSessionIdLength(int length) set session id length
-
字段详细资料
-
random
-
length
private int length -
SESSION_ID_ALPHABET
private static final char[] SESSION_ID_ALPHABET -
ALPHABET_PROPERTY
- 另请参阅:
-
-
构造器详细资料
-
SecureRandomSessionIdGenerator
public SecureRandomSessionIdGenerator()
-
-
方法详细资料
-
generateId
从接口复制的说明:SessionIdGeneratorGenerate a new identifier.- 指定者:
generateId在接口中SessionIdGenerator- 返回:
- the generated identifier
-
setSessionIdLength
public void setSessionIdLength(int length) set session id length -
encode
private char[] encode(byte[] data) Encode the bytes into a String with a slightly modified Base64-algorithm This code was written by Kevin Kelleykelley@ruralnet.netand adapted by Thomas Peussjboss@peuss.de- 参数:
data- The bytes you want to encode- 返回:
- the encoded String
-