org.owasp.esapi
Interface EncryptedProperties

All Known Implementing Classes:
DefaultEncryptedProperties

public interface EncryptedProperties

The EncryptedProperties interface represents a properties file where all the data is encrypted before it is added, and decrypted when it retrieved. This interface can be implemented in a number of ways, the simplest being extending Properties and overloading the getProperty and setProperty methods.

Since:
June 1, 2007
Author:
Jeff Williams (jeff.williams .at. aspectsecurity.com) Aspect Security

Method Summary
 java.lang.String getProperty(java.lang.String key)
          Gets the property value from the encrypted store, decrypts it, and returns the plaintext value to the caller.
 java.lang.String setProperty(java.lang.String key, java.lang.String value)
          Encrypts the plaintext property value and stores the ciphertext value in the encrypted store.
 

Method Detail

getProperty

public java.lang.String getProperty(java.lang.String key)
                             throws EncryptionException
Gets the property value from the encrypted store, decrypts it, and returns the plaintext value to the caller.

Parameters:
key - the key
Returns:
the property
Throws:
EncryptionException - the encryption exception

setProperty

public java.lang.String setProperty(java.lang.String key,
                                    java.lang.String value)
                             throws EncryptionException
Encrypts the plaintext property value and stores the ciphertext value in the encrypted store.

Parameters:
key - the key
value - the value
Returns:
the object
Throws:
EncryptionException - the encryption exception