de.smartics.properties.api.core.security
Class Base64PropertyValueSecurity

Package class diagram package Base64PropertyValueSecurity
java.lang.Object
  extended by de.smartics.properties.api.core.security.Base64PropertyValueSecurity
All Implemented Interfaces:
PropertyValueSecurity, Serializable

public final class Base64PropertyValueSecurity
     
     
extends Object
implements PropertyValueSecurity

Not a security implementation, but one that obscures plain values by using a reversible Base64 encoding.

This implementation allows a descriptor of null.

See Also:
Serialized Form

Constructor Summary
Base64PropertyValueSecurity()
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64PropertyValueSecurity

public Base64PropertyValueSecurity()
Default constructor.

Method Detail

decrypt

public String decrypt(PropertyDescriptor descriptor,
                      String encryptedValue)
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.

encrypt

public String encrypt(PropertyDescriptor descriptor,
                      String plainValue)
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.


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