public class EncryptedPropertiesUtils extends Object
Usage:
java org.owasp.esapi.reference.crypto.EncryptedPropertiesUtils [--in file] [--out file]
[--in-encrypted true|false] [--verbose true|false]
Command line parameters:
EncryptedProperties| Constructor and Description |
|---|
EncryptedPropertiesUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
addProperty(Properties props,
String key,
String value)
Adds a new key-value property to the passed Properties object
|
static Properties |
loadProperties(String inFile,
Boolean inFileEncrypted)
Loads a Properties file from a filename.
|
static void |
main(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(String outFile,
Properties props,
String message)
Stores a Properties object to a file.
|
public static void main(String[] args) throws Exception
Exception - Any exception thrownpublic static Properties loadProperties(String inFile, Boolean inFileEncrypted) throws IOException
inFile - Filename to load Properties from.inFileEncrypted - If true, the input file is assumed to be already encrypted. Default true.IOExceptionpublic static void storeProperties(String outFile, Properties props, String message) throws Exception
outFile - Filename to store toprops - Properties to storemessage - A message to add to the comments in the stored fileExceptionpublic static Object addProperty(Properties props, String key, String value)
props - The Properties object to add tokey - The key to addvalue - The value to setCopyright © 2016 The Open Web Application Security Project (OWASP). All rights reserved.