public class PropertyEncryptor
extends java.lang.Object
Constructor and Description |
---|
PropertyEncryptor()
Create a new propertyEncryptor
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
decryptFromFile(java.io.File file)
Decrypt the property map from the provided file.
|
void |
encryptToFile(java.util.Map<java.lang.String,java.lang.String> propMap,
java.io.File file)
Decrypt the property map from the provided file.
|
void |
setKey(java.lang.String key)
Set the key.
|
public java.util.Map<java.lang.String,java.lang.String> decryptFromFile(java.io.File file) throws java.io.IOException
file
- the file to readjava.io.IOException
- if there is a problem reading the file or decrypting
it.public void encryptToFile(java.util.Map<java.lang.String,java.lang.String> propMap, java.io.File file) throws java.io.IOException
propMap
- the property mapfile
- the file to readjava.io.IOException
- if there is a problem reading the file or decrypting
it.public void setKey(java.lang.String key)
key
- key string for the secret key