Package org.apache.ofbiz.entity.util
Class EntityCrypto.ShiroStorageHandler
java.lang.Object
org.apache.ofbiz.entity.util.EntityCrypto.StorageHandler
org.apache.ofbiz.entity.util.EntityCrypto.ShiroStorageHandler
- Enclosing class:
- EntityCrypto
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]
decodeKeyBytes
(String keyText) protected byte[]
decryptValue
(byte[] key, ModelField.EncryptMethod encryptMethod, String encryptedString) protected String
encodeKey
(byte[] key) protected String
encryptValue
(ModelField.EncryptMethod encryptMethod, byte[] key, byte[] objBytes) protected Key
protected String
getHashedKeyName
(String originalKeyName) protected String
getKeyMapPrefix
(String hashedKeyName)
-
Constructor Details
-
ShiroStorageHandler
protected ShiroStorageHandler(byte[] kek)
-
-
Method Details
-
generateNewKey
- Specified by:
generateNewKey
in classEntityCrypto.StorageHandler
-
getHashedKeyName
- Specified by:
getHashedKeyName
in classEntityCrypto.StorageHandler
-
getKeyMapPrefix
- Specified by:
getKeyMapPrefix
in classEntityCrypto.StorageHandler
-
decodeKeyBytes
- Specified by:
decodeKeyBytes
in classEntityCrypto.StorageHandler
- Throws:
GeneralException
-
encodeKey
- Specified by:
encodeKey
in classEntityCrypto.StorageHandler
- Throws:
GeneralException
-
decryptValue
protected byte[] decryptValue(byte[] key, ModelField.EncryptMethod encryptMethod, String encryptedString) throws GeneralException - Specified by:
decryptValue
in classEntityCrypto.StorageHandler
- Throws:
GeneralException
-
encryptValue
protected String encryptValue(ModelField.EncryptMethod encryptMethod, byte[] key, byte[] objBytes) throws GeneralException - Specified by:
encryptValue
in classEntityCrypto.StorageHandler
- Throws:
GeneralException
-