de.smartics.properties.api.core.security
Class PropertiesBasedPropertyValueSecurity
java.lang.Object
de.smartics.properties.api.core.security.AbstractPropertyValueSecurity
de.smartics.properties.api.core.security.PropertiesBasedPropertyValueSecurity
-
All Implemented Interfaces:
-
PropertyValueSecurity,
Serializable
-
public class PropertiesBasedPropertyValueSecurity
-
extends
AbstractPropertyValueSecurity
Base implementation based on Java security, loading configuration values from a properties file stored in SecurityConfigurationLoader#CLASSPATH_LOCATION
.
-
See Also:
-
Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertiesBasedPropertyValueSecurity
public PropertiesBasedPropertyValueSecurity()
-
Default constructor.
decrypt
public String decrypt(PropertyDescriptor descriptor,
String encryptedValue)
throws NullPointerException,
SecurityException
-
Description copied from interface:
PropertyValueSecurity
-
Decrypts the given property value.
-
-
Parameters:
-
descriptor
- the descriptor of the property.
-
encryptedValue
- the encrypted value of the property to be decrypted.
-
Returns:
-
the decrypted value.
-
Throws:
-
NullPointerException
- may be thrown if
descriptor
is
null
.
-
SecurityException
- if the value cannot be decrypted.
encrypt
public String encrypt(PropertyDescriptor descriptor,
String plainValue)
throws NullPointerException,
SecurityException
-
Description copied from interface:
PropertyValueSecurity
-
Encrypts the given property value.
-
-
Parameters:
-
descriptor
- the descriptor of the property.
-
plainValue
- the plain value of the property to be encrypted.
-
Returns:
-
the encrypted value.
-
Throws:
-
NullPointerException
- may be thrown if
descriptor
is
null
.
-
SecurityException
- if the value cannot be encrypted.
Copyright © 2012-2013
Kronseder & Reiner GmbH - smartics. All Rights Reserved.