org.keycloak.common.util

## Class RandomString

- java.lang.Object
- - org.keycloak.common.util.RandomString

-     public class RandomString
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `alphanum`
    `static String` | `digits`
    `static String` | `lower`
    `static String` | `upper`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RandomString()` Create session identifiers.
    `RandomString(int length)` Create an alphanumeric strings from a secure generator.
    `RandomString(int length, Random random)` Create an alphanumeric string generator.
    `RandomString(int length, Random random, String symbols)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `nextString()` Generate a random string.
    `static String` | `randomCode(int length)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### upper

          public static final String upper

      See Also:
        Constant Field Values

    - #### lower

          public static final String lower

    - #### digits

          public static final String digits

      See Also:
        Constant Field Values

    - #### alphanum

          public static final String alphanum

  - ### Constructor Detail

    - #### RandomString

          public RandomString(int length,
                              Random random,
                              String symbols)

    - #### RandomString

          public RandomString(int length,
                              Random random)

      Create an alphanumeric string generator.

    - #### RandomString

          public RandomString(int length)

      Create an alphanumeric strings from a secure generator.

    - #### RandomString

          public RandomString()

      Create session identifiers.

  - ### Method Detail

    - #### nextString

          public String nextString()

      Generate a random string.

    - #### randomCode

          public static String randomCode(int length)

Copyright © 2020 JBoss by Red Hat. All rights reserved.