de.smartics.properties.security.esapi
Class AbstractEsapiPropertyValueSecurity

Package class diagram package AbstractEsapiPropertyValueSecurity
java.lang.Object
  extended by de.smartics.properties.security.esapi.AbstractEsapiPropertyValueSecurity
All Implemented Interfaces:
PropertyValueSecurity, Serializable
Direct Known Subclasses:
EsapiPropertyValueSecurity

public abstract class AbstractEsapiPropertyValueSecurity
     
     
extends Object
implements PropertyValueSecurity

Base implementation based on OWASP ESAPI.

See Also:
Serialized Form

Constructor Summary
AbstractEsapiPropertyValueSecurity()
          Default constructor.
 
Method Summary
 String decrypt(PropertyDescriptor descriptor, String encryptedValue)
          Decrypts the given property value.
 String encrypt(PropertyDescriptor descriptor, String plainValue)
          Encrypts the given property value.
protected abstract  org.owasp.esapi.Encryptor provideEncryptor()
          Provides the encryptor to use for encryption.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractEsapiPropertyValueSecurity

public AbstractEsapiPropertyValueSecurity()
Default constructor.

Method Detail

decrypt

public String decrypt(PropertyDescriptor descriptor,
                      String encryptedValue)
               throws SecurityException
Description copied from interface: PropertyValueSecurity
Decrypts the given property value.

Specified by:
decrypt in interface PropertyValueSecurity
Parameters:
descriptor - the descriptor of the property.
encryptedValue - the encrypted value of the property to be decrypted.
Returns:
the decrypted value.
Throws:
SecurityException - if the value cannot be decrypted.

provideEncryptor

protected abstract org.owasp.esapi.Encryptor provideEncryptor()
                                                       throws org.owasp.esapi.errors.EncryptionException
Provides the encryptor to use for encryption.

Returns:
the encryptor to use for encryption.
Throws:
org.owasp.esapi.errors.EncryptionException - on any encryption problem.

encrypt

public String encrypt(PropertyDescriptor descriptor,
                      String plainValue)
               throws SecurityException
Description copied from interface: PropertyValueSecurity
Encrypts the given property value.

Specified by:
encrypt in interface PropertyValueSecurity
Parameters:
descriptor - the descriptor of the property.
plainValue - the plain value of the property to be encrypted.
Returns:
the encrypted value.
Throws:
SecurityException - if the value cannot be encrypted.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.