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
protected static final class EntityCrypto.ShiroStorageHandler extends EntityCrypto.StorageHandler
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ShiroStorageHandler(byte[] kek)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]
decodeKeyBytes(java.lang.String keyText)
protected byte[]
decryptValue(byte[] key, ModelField.EncryptMethod encryptMethod, java.lang.String encryptedString)
protected java.lang.String
encodeKey(byte[] key)
protected java.lang.String
encryptValue(ModelField.EncryptMethod encryptMethod, byte[] key, byte[] objBytes)
protected java.security.Key
generateNewKey()
protected java.lang.String
getHashedKeyName(java.lang.String originalKeyName)
protected java.lang.String
getKeyMapPrefix(java.lang.String hashedKeyName)
-
-
-
Method Detail
-
generateNewKey
protected java.security.Key generateNewKey()
- Specified by:
generateNewKey
in classEntityCrypto.StorageHandler
-
getHashedKeyName
protected java.lang.String getHashedKeyName(java.lang.String originalKeyName)
- Specified by:
getHashedKeyName
in classEntityCrypto.StorageHandler
-
getKeyMapPrefix
protected java.lang.String getKeyMapPrefix(java.lang.String hashedKeyName)
- Specified by:
getKeyMapPrefix
in classEntityCrypto.StorageHandler
-
decodeKeyBytes
protected byte[] decodeKeyBytes(java.lang.String keyText) throws GeneralException
- Specified by:
decodeKeyBytes
in classEntityCrypto.StorageHandler
- Throws:
GeneralException
-
encodeKey
protected java.lang.String encodeKey(byte[] key) throws GeneralException
- Specified by:
encodeKey
in classEntityCrypto.StorageHandler
- Throws:
GeneralException
-
decryptValue
protected byte[] decryptValue(byte[] key, ModelField.EncryptMethod encryptMethod, java.lang.String encryptedString) throws GeneralException
- Specified by:
decryptValue
in classEntityCrypto.StorageHandler
- Throws:
GeneralException
-
encryptValue
protected java.lang.String encryptValue(ModelField.EncryptMethod encryptMethod, byte[] key, byte[] objBytes) throws GeneralException
- Specified by:
encryptValue
in classEntityCrypto.StorageHandler
- Throws:
GeneralException
-
-