Package org.wildfly.security.tool
Class MaskCommand
- java.lang.Object
-
- org.wildfly.security.tool.Command
-
- org.wildfly.security.tool.MaskCommand
-
class MaskCommand extends Command
Mask Command This command is used for creation of masked password strings.- Author:
- Peter Skopek
-
-
Field Summary
Fields Modifier and Type Field Description private org.apache.commons.cli.CommandLine
cmdLine
(package private) static String
DEBUG_PARAM
private int
defaultIterationCount
(package private) static String
HELP_PARAM
(package private) static String
ITERATION_PARAM
static String
MASK_COMMAND
Command stringprivate org.apache.commons.cli.Options
options
private org.apache.commons.cli.CommandLineParser
parser
(package private) static String
SALT_PARAM
(package private) static String
SECRET_PARAM
-
Fields inherited from class org.wildfly.security.tool.Command
GENERAL_CONFIGURATION_ERROR, INPUT_DATA_NOT_CONFIRMED, WIDTH
-
-
Constructor Summary
Constructors Constructor Description MaskCommand()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static String
computeMasked(String secret, String salt, int iteration)
(package private) static char[]
decryptMasked(String maskedPassword)
void
execute(String[] args)
void
help()
Display help to the command.-
Methods inherited from class org.wildfly.security.tool.Command
aliases, getProvidersSupplier, getStatus, getToolCommand, isAlias, isEnableDebug, isWindows, printDuplicatesWarning, printDuplicatesWarning, prompt, setEnableDebug, setStatus, setToolCommand
-
-
-
-
Field Detail
-
MASK_COMMAND
public static final String MASK_COMMAND
Command string- See Also:
- Constant Field Values
-
SALT_PARAM
static final String SALT_PARAM
- See Also:
- Constant Field Values
-
ITERATION_PARAM
static final String ITERATION_PARAM
- See Also:
- Constant Field Values
-
SECRET_PARAM
static final String SECRET_PARAM
- See Also:
- Constant Field Values
-
HELP_PARAM
static final String HELP_PARAM
- See Also:
- Constant Field Values
-
DEBUG_PARAM
static final String DEBUG_PARAM
- See Also:
- Constant Field Values
-
defaultIterationCount
private final int defaultIterationCount
- See Also:
- Constant Field Values
-
options
private final org.apache.commons.cli.Options options
-
parser
private org.apache.commons.cli.CommandLineParser parser
-
cmdLine
private org.apache.commons.cli.CommandLine cmdLine
-
-
Method Detail
-
computeMasked
static String computeMasked(String secret, String salt, int iteration) throws GeneralSecurityException
- Throws:
GeneralSecurityException
-
decryptMasked
static char[] decryptMasked(String maskedPassword) throws GeneralSecurityException
- Throws:
GeneralSecurityException
-
-