Package org.apache.ofbiz.entity.util
Class EntityCrypto.SaltedBase64StorageHandler
- java.lang.Object
-
- org.apache.ofbiz.entity.util.EntityCrypto.StorageHandler
-
- org.apache.ofbiz.entity.util.EntityCrypto.SaltedBase64StorageHandler
-
- Enclosing class:
- EntityCrypto
protected static final class EntityCrypto.SaltedBase64StorageHandler extends EntityCrypto.StorageHandler
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SaltedBase64StorageHandler(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)
-
-
-
Constructor Detail
-
SaltedBase64StorageHandler
protected SaltedBase64StorageHandler(byte[] kek) throws EntityCryptoException
- Throws:
EntityCryptoException
-
-
Method Detail
-
generateNewKey
protected java.security.Key generateNewKey() throws EntityCryptoException
- Specified by:
generateNewKey
in classEntityCrypto.StorageHandler
- Throws:
EntityCryptoException
-
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
-
-