public class CreatePassword
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
consoleEncoding |
private static boolean |
debug |
private static java.lang.String |
DEFAULT_CONSOLE_ENCODING |
private static java.lang.String |
DEFAULT_FILE_ENCODING |
static int |
FILE_DOES_NOT_EXIST
File not found
|
private static java.lang.String |
fileEncoding |
static org.apache.commons.logging.Log |
log
logger
|
private static java.io.PrintStream |
outPrintStream |
private static java.lang.String |
password |
private static java.lang.String |
propertiesFilename |
private static java.lang.String |
propertyKey |
static int |
SUCCESSFUL_COMPLETION
Success
|
static int |
UNSPECIFIED_ERROR
Other Error
|
private static java.lang.String |
usage |
Constructor and Description |
---|
CreatePassword() |
Modifier and Type | Method and Description |
---|---|
static int |
createPassword(java.lang.String propertyFilename,
java.lang.String key,
java.lang.String password,
java.lang.String fEncoding,
java.lang.String cEncoding,
boolean debugOn)
Create an encrypted password for the specified key and write the results to the specified
properties file
|
protected static java.lang.String |
getConsoleEncoding() |
protected static java.lang.String |
getFileEncoding() |
protected static java.lang.String |
getPassword() |
protected static java.lang.String |
getPropertiesFilename() |
protected static java.lang.String |
getPropertyKey() |
private static java.lang.String |
getPropertyOnLine(java.lang.String line) |
protected static boolean |
isDebug() |
static void |
main(java.lang.String[] args) |
private static void |
println(java.lang.String str) |
static void |
processArgs(java.lang.String[] args)
Process the Args to operate on KonaKart Messages
|
protected static void |
setConsoleEncoding(java.lang.String consoleEncoding) |
protected static void |
setDebug(boolean debug) |
protected static void |
setFileEncoding(java.lang.String fileEncoding) |
protected static void |
setPassword(java.lang.String password) |
protected static void |
setPropertiesFilename(java.lang.String propertiesFilename) |
protected static void |
setPropertyKey(java.lang.String propertyKey) |
public static org.apache.commons.logging.Log log
public static final int SUCCESSFUL_COMPLETION
public static final int FILE_DOES_NOT_EXIST
public static final int UNSPECIFIED_ERROR
private static final java.lang.String DEFAULT_CONSOLE_ENCODING
private static java.lang.String consoleEncoding
private static final java.lang.String DEFAULT_FILE_ENCODING
private static java.lang.String fileEncoding
private static final java.lang.String usage
private static java.lang.String propertiesFilename
private static java.lang.String propertyKey
private static java.lang.String password
private static boolean debug
private static java.io.PrintStream outPrintStream
public static void main(java.lang.String[] args)
args
- the argspublic static void processArgs(java.lang.String[] args) throws java.lang.Exception
args
- command line argumentsjava.lang.Exception
- an unexpected exceptionpublic static int createPassword(java.lang.String propertyFilename, java.lang.String key, java.lang.String password, java.lang.String fEncoding, java.lang.String cEncoding, boolean debugOn)
propertyFilename
- the propertyFilenamekey
- the keypassword
- if password is null we encrypt the existing passwordfEncoding
- the fEncodingcEncoding
- the cEncodingdebugOn
- the debugOnprivate static java.lang.String getPropertyOnLine(java.lang.String line)
private static void println(java.lang.String str) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
protected static java.lang.String getConsoleEncoding()
protected static void setConsoleEncoding(java.lang.String consoleEncoding)
consoleEncoding
- the consoleEncoding to setprotected static java.lang.String getFileEncoding()
protected static void setFileEncoding(java.lang.String fileEncoding)
fileEncoding
- the fileEncoding to setprotected static java.lang.String getPropertiesFilename()
protected static void setPropertiesFilename(java.lang.String propertiesFilename)
propertiesFilename
- the propertiesFilename to setprotected static java.lang.String getPropertyKey()
protected static void setPropertyKey(java.lang.String propertyKey)
propertyKey
- the propertyKey to setprotected static java.lang.String getPassword()
protected static void setPassword(java.lang.String password)
password
- the password to setprotected static boolean isDebug()
protected static void setDebug(boolean debug)
debug
- the debug to setCopyright © 2018 DS Data Systems UK Ltd.