Package org.keycloak.common.util
Class SecretGenerator
- java.lang.Object
-
- org.keycloak.common.util.SecretGenerator
-
public class SecretGenerator extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static char[]
ALPHANUM
static char[]
DIGITS
static int
SECRET_LENGTH_256_BITS
static int
SECRET_LENGTH_384_BITS
static int
SECRET_LENGTH_512_BITS
static char[]
UPPER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SecretGenerator
getInstance()
byte[]
randomBytes()
byte[]
randomBytes(int length)
String
randomString()
String
randomString(int length)
String
randomString(int length, char[] symbols)
-
-
-
Field Detail
-
SECRET_LENGTH_256_BITS
public static final int SECRET_LENGTH_256_BITS
- See Also:
- Constant Field Values
-
SECRET_LENGTH_384_BITS
public static final int SECRET_LENGTH_384_BITS
- See Also:
- Constant Field Values
-
SECRET_LENGTH_512_BITS
public static final int SECRET_LENGTH_512_BITS
- See Also:
- Constant Field Values
-
UPPER
public static final char[] UPPER
-
DIGITS
public static final char[] DIGITS
-
ALPHANUM
public static final char[] ALPHANUM
-
-
Method Detail
-
getInstance
public static SecretGenerator getInstance()
-
randomString
public String randomString()
-
randomString
public String randomString(int length)
-
randomString
public String randomString(int length, char[] symbols)
-
randomBytes
public byte[] randomBytes()
-
randomBytes
public byte[] randomBytes(int length)
-
-