|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.owasp.esapi.reference.crypto.EncryptedPropertiesUtils
public class EncryptedPropertiesUtils
Command line utilities for reading, writing and creating encrypted properties files.
Usage:
java org.owasp.esapi.reference.crypto.EncryptedPropertiesUtils [--in file] [--out file]
[--in-encrypted true|false] [--verbose true|false]
Command line parameters:
EncryptedProperties
Constructor Summary | |
---|---|
EncryptedPropertiesUtils()
|
Method Summary | |
---|---|
static java.lang.Object |
addProperty(java.util.Properties props,
java.lang.String key,
java.lang.String value)
Adds a new key-value property to the passed Properties object |
static java.util.Properties |
loadProperties(java.lang.String inFile,
java.lang.Boolean inFileEncrypted)
Loads a Properties file from a filename. |
static void |
main(java.lang.String[] args)
Loads encrypted or plaintext properties file based on the location passed in args then prompts the user to input key-value pairs. |
static void |
storeProperties(java.lang.String outFile,
java.util.Properties props,
java.lang.String message)
Stores a Properties object to a file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EncryptedPropertiesUtils()
Method Detail |
---|
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
- Any exception thrownpublic static java.util.Properties loadProperties(java.lang.String inFile, java.lang.Boolean inFileEncrypted) throws java.io.IOException
inFile
- Filename to load Properties from.inFileEncrypted
- If true, the input file is assumed to be already encrypted. Default true.
java.io.IOException
public static void storeProperties(java.lang.String outFile, java.util.Properties props, java.lang.String message) throws java.lang.Exception
outFile
- Filename to store toprops
- Properties to storemessage
- A message to add to the comments in the stored file
java.lang.Exception
public static java.lang.Object addProperty(java.util.Properties props, java.lang.String key, java.lang.String value)
props
- The Properties object to add tokey
- The key to addvalue
- The value to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |