are optional. If only a single password is specified
at the command line, then only this single password is written to the stash
file. If two passwords and a security provider are passed then the provider
will be used for the cryptography (both passwords may be equal).
Field Summary |
static java.lang.String |
STASH_FILE_NAME
The default stash file name. |
Method Summary |
static void |
createStashFile(java.lang.String aKeyStorePassword)
Creates a stash file with no key password. |
static java.lang.String |
createStashFile(java.lang.String aKeyStorePassword,
java.lang.String aKeyPassword)
Creates a stash file with default name and writes the password parameters
in it. |
static java.lang.String |
createStashFile(java.lang.String aKeyStorePassword,
java.lang.String aKeyPassword,
java.security.Provider provider)
|
static void |
main(java.lang.String[] args)
The main method of the command line utility class. |
static java.util.Vector<java.lang.String> |
readPasswords()
Reads the passwords from the default stash file. |
static java.util.Vector<java.lang.String> |
readPasswords(java.lang.String aStashFile)
Reads the passwords from a specified stash file. |
static java.util.Vector<java.lang.String> |
readPasswordsFromFile(java.lang.String aStashFile)
Reads the passwords from a specified stash file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STASH_FILE_NAME
public static final java.lang.String STASH_FILE_NAME
- The default stash file name.
- See Also:
- Constant Field Values
StashFile
public StashFile()
createStashFile
public static void createStashFile(java.lang.String aKeyStorePassword)
throws java.lang.Exception
- Creates a stash file with no key password.
- Parameters:
aKeyStorePassword
- the key store password
- Throws:
java.lang.Exception
createStashFile
public static java.lang.String createStashFile(java.lang.String aKeyStorePassword,
java.lang.String aKeyPassword)
throws java.lang.Exception
- Creates a stash file with default name and writes the password parameters
in it.
- Parameters:
aKeyStorePassword
- the key store passwordaKeyPassword
- the key password
- Returns:
- the absolute file name of the stash file
- Throws:
java.lang.Exception
- if the key store password parameter is null or an empty
string.
createStashFile
public static java.lang.String createStashFile(java.lang.String aKeyStorePassword,
java.lang.String aKeyPassword,
java.security.Provider provider)
throws java.lang.Exception
- Throws:
java.lang.Exception
readPasswords
public static java.util.Vector<java.lang.String> readPasswords()
throws java.lang.Exception
- Reads the passwords from the default stash file. This method is used by
the TDI Server (com.ibm.di.server.RS) to read the passwords it needs.
- Returns:
- a vector containing the passwords
- Throws:
java.lang.Exception
- if the stash file has already been read
readPasswords
public static java.util.Vector<java.lang.String> readPasswords(java.lang.String aStashFile)
throws java.lang.Exception
- Reads the passwords from a specified stash file.
- Parameters:
aStashFile
- the path of the stash file
- Returns:
- a vector containing the passwords
- Throws:
java.lang.Exception
- if the stash file has already been read
readPasswordsFromFile
public static java.util.Vector<java.lang.String> readPasswordsFromFile(java.lang.String aStashFile)
throws java.lang.Exception
- Reads the passwords from a specified stash file. This method will not
complain that it has been called more than once.
Note: This method is for internal usage only. Any dependency from
the end-user will not be supported. Changes to this class will happen
without a warning.
- Parameters:
aStashFile
- the path of the stash file
- Returns:
- a vector containing the passwords
- Throws:
java.lang.Exception
- if the stash file has already been read
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- The main method of the command line utility class. Takes as arguments one
or two passwords. The first one is the key store password and the second
is the key password.
- Parameters:
args
- command line arguments
- Throws:
java.lang.Exception