java.lang.Object
org.elasticsearch.xpack.security.tool.CommandUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic char[]generatePassword(int passwordLength) Generates a password of a given length from a set of predefined allowed chars.protected static StringgenerateUsername(String prefix, String suffix, int length) Generates a string that can be used as a username, possibly consisting of a chosen prefix and suffix
-
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
-