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)
           
 String encrypt(PropertyDescriptor descriptor, String plainValue)
           
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
Specified by:
decrypt in interface PropertyValueSecurity
Throws:
SecurityException

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
Specified by:
encrypt in interface PropertyValueSecurity
Throws:
SecurityException


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