Class IntegerDbValueEncryptor
- java.lang.Object
-
- de.xima.fc.persistence.impl.security.IntegerDbValueEncryptor
-
- All Implemented Interfaces:
DbValueEncryptor<Integer,String>
public class IntegerDbValueEncryptor extends Object implements DbValueEncryptor<Integer,String>
Encryptor that converts Integer values to encrypted String values and vice versa.- Since:
- 8.5.0
- Author:
- Norman Lorenz
-
-
Constructor Summary
Constructors Constructor Description IntegerDbValueEncryptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integerdecrypt(String value, Properties config)Decrypts the given value.Stringencrypt(Integer value, Properties config)Encrypts the given value.Class<String>getEncryptedType()Gets the class type of the encrypted value.Class<Integer>getUnencryptedType()Gets the class type of the unencrypted value.
-
-
-
Method Detail
-
decrypt
public Integer decrypt(String value, Properties config) throws FcEncryptionException
Description copied from interface:DbValueEncryptorDecrypts the given value.- Specified by:
decryptin interfaceDbValueEncryptor<Integer,String>- Parameters:
value- The value to decrypt.config- Optional. The configuration for decryption, can be used e.g. to differentiate between different encryption contexts.- Returns:
- The decrypted value.
- Throws:
FcEncryptionException- If decryption fails.
-
encrypt
public String encrypt(Integer value, Properties config) throws FcEncryptionException
Description copied from interface:DbValueEncryptorEncrypts the given value.- Specified by:
encryptin interfaceDbValueEncryptor<Integer,String>- Parameters:
value- The value to encrypt.config- Optional. The configuration for encryption, can be used to e.g. differentiate between different encryption contexts.- Returns:
- The encrypted value.
- Throws:
FcEncryptionException- If encryption fails.
-
getEncryptedType
public Class<String> getEncryptedType()
Description copied from interface:DbValueEncryptorGets the class type of the encrypted value.- Specified by:
getEncryptedTypein interfaceDbValueEncryptor<Integer,String>- Returns:
- The class type of the encrypted value.
-
getUnencryptedType
public Class<Integer> getUnencryptedType()
Description copied from interface:DbValueEncryptorGets the class type of the unencrypted value.- Specified by:
getUnencryptedTypein interfaceDbValueEncryptor<Integer,String>- Returns:
- The class type of the unencrypted value.
-
-