Class SecretGenerator

java.lang.Object
org.keycloak.common.util.SecretGenerator

public class SecretGenerator extends Object
  • Field Details

    • SECRET_LENGTH_256_BITS

      public static final int SECRET_LENGTH_256_BITS
      See Also:
    • SECRET_LENGTH_384_BITS

      public static final int SECRET_LENGTH_384_BITS
      See Also:
    • SECRET_LENGTH_512_BITS

      public static final int SECRET_LENGTH_512_BITS
      See Also:
    • UPPER

      public static final char[] UPPER
    • DIGITS

      public static final char[] DIGITS
    • ALPHANUM

      public static final char[] ALPHANUM
  • Method Details

    • 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)