|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.api.core.security.AbstractPropertyValueSecurity
public abstract class AbstractPropertyValueSecurity
Base implementation based on Java security.
Constructor Summary | |
---|---|
protected |
AbstractPropertyValueSecurity() Default constructor. |
Method Summary | |
---|---|
protected byte[] |
decodePropertyValue(String encryptedValue) Decodes the encrypted property value. |
protected String |
decrypt(PropertyDescriptor descriptor, String encryptedValue, SecretKey key, Cipher cipher) Decrypts the given property value. |
protected String |
encodePropertyValue(byte[] encryptedBytes) Encodes the encrypted bytes. |
protected String |
encrypt(PropertyDescriptor descriptor, String plainValue, SecretKey key, Cipher cipher) Encrypts the given property value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.smartics.properties.api.core.security.PropertyValueSecurity |
---|
decrypt, encrypt |
Constructor Detail |
---|
protected AbstractPropertyValueSecurity()
Method Detail |
---|
protected String decrypt(PropertyDescriptor descriptor, String encryptedValue, SecretKey key, Cipher cipher) throws NullPointerException, SecurityException
descriptor
- the descriptor of the property.
encryptedValue
- the encrypted value of the property to be decrypted.
key
- the key used for decryption.
cipher
- the cipher instance for decryption.
NullPointerException
- may be thrown if
descriptor
is
null
.
SecurityException
- if the value cannot be decrypted.
protected String encrypt(PropertyDescriptor descriptor, String plainValue, SecretKey key, Cipher cipher) throws NullPointerException, SecurityException
descriptor
- the descriptor of the property.
plainValue
- the plain value of the property to be encrypted.
key
- the key used for encryption.
cipher
- the cipher instance for encryption.
NullPointerException
- may be thrown if
descriptor
is
null
.
SecurityException
- if the value cannot be encrypted.
protected byte[] decodePropertyValue(String encryptedValue)
encryptedValue
- the encrypted value to decode.
protected String encodePropertyValue(byte[] encryptedBytes)
encryptedBytes
- the bytes to encode.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |