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.CommandLinecmdLine(package private) static StringDEBUG_PARAMprivate intdefaultIterationCount(package private) static StringHELP_PARAM(package private) static StringITERATION_PARAMstatic StringMASK_COMMANDCommand stringprivate org.apache.commons.cli.Optionsoptionsprivate org.apache.commons.cli.CommandLineParserparser(package private) static StringSALT_PARAM(package private) static StringSECRET_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 StringcomputeMasked(String secret, String salt, int iteration)(package private) static char[]decryptMasked(String maskedPassword)voidexecute(String[] args)voidhelp()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
-
-