com.ibm.di.server
Class StashFile
java.lang.Object
com.ibm.di.server.StashFile
public class StashFile
- extends Object
This class implements a command line utility for creating and reading stash files.
The stash file stores two passwords in encrypted form. When the file is being
written the password are being enrypted and when the file is being read the
password are being decrypted by this utility.
These two passwords are passed as command line parameters to this utility.
Utility usage:
StashFile []
Only the password is required. The
is optional. If only a single password is specified at
the command line, then only this single password is written to the 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 String STASH_FILE_NAME
- The default stash file name.
- See Also:
- Constant Field Values
StashFile
public StashFile()
createStashFile
public static void createStashFile(String aKeyStorePassword)
throws Exception
- Creates a stash file with no key password.
- Parameters:
aKeyStorePassword - the key store password
- Throws:
Exception
createStashFile
public static String createStashFile(String aKeyStorePassword,
String aKeyPassword)
throws 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:
Exception - if the key store password parameter is null or an empty string.
readPasswords
public static Vector readPasswords()
throws 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:
Exception - if the stash file has already been read
readPasswords
public static Vector readPasswords(String aStashFile)
throws Exception
- Reads the passwords from a specified stash file.
- Parameters:
aStashFile - the path of the stash file
- Returns:
- a vector containing the passwords
- Throws:
Exception - if the stash file has already been read
main
public static void main(String[] args)
throws 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:
Exception