2424
2525
2626/**
27- * The EncryptedProperties interface represents a properties file where all the data is
28- * encrypted before it is added, and decrypted when it retrieved. This interface can be
29- * implemented in a number of ways, the simplest being extending Properties and overloading
30- * the getProperty and setProperty methods.
27+ * The {@code EncryptedProperties} interface represents a properties file
28+ * where all the data is encrypted before it is added, and decrypted when it
29+ * retrieved. This interface can be implemented in a number of ways, the
30+ * simplest being extending {@link java.util.Properties} and overloading
31+ * the {@code getProperty} and {@code setProperty} methods. In all cases,
32+ * the master encryption key, as given by the {@code Encryptor.MasterKey}
33+ * property in <b><code>ESAPI.properties</code></b> file.
3134 * <P>
3235 * <img src="doc-files/EncryptedProperties.jpg">
3336 * <P>
3942public interface EncryptedProperties {
4043
4144 /**
42- * Gets the property value from the encrypted store, decrypts it, and returns the plaintext value to the caller.
45+ * Gets the property value from the encrypted store, decrypts it, and
46+ * returns the plaintext value to the caller.
4347 *
4448 * @param key
4549 * the name of the property to get
@@ -53,15 +57,17 @@ public interface EncryptedProperties {
5357 String getProperty (String key ) throws EncryptionException ;
5458
5559 /**
56- * Encrypts the plaintext property value and stores the ciphertext value in the encrypted store.
60+ * Encrypts the plaintext property value and stores the ciphertext value
61+ * in the encrypted store.
5762 *
5863 * @param key
5964 * the name of the property to set
6065 * @param value
6166 * the value of the property to set
6267 *
6368 * @return
64- * the encrypted property value
69+ * the previously encrypted property value for the specified key, or
70+ * {@code null} if it did not have one.
6571 *
6672 * @throws EncryptionException
6773 * if the property could not be encrypted
0 commit comments