java.lang.Object
org.elasticsearch.xpack.security.tool.CommandUtils

public class CommandUtils extends Object
  • Constructor Details

    • CommandUtils

      public CommandUtils()
  • Method Details

    • generatePassword

      public static char[] generatePassword(int passwordLength)
      Generates a password of a given length from a set of predefined allowed chars.
      Parameters:
      passwordLength - the length of the password
      Returns:
      the char array with the password
    • generateUsername

      protected static String generateUsername(@Nullable String prefix, @Nullable String suffix, int length)
      Generates a string that can be used as a username, possibly consisting of a chosen prefix and suffix