Package org.apache.ofbiz.entity.util
Class EntityCrypto
- java.lang.Object
-
- org.apache.ofbiz.entity.util.EntityCrypto
-
public final class EntityCrypto extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
EntityCrypto.LegacyStorageHandler
protected static class
EntityCrypto.SaltedBase64StorageHandler
protected static class
EntityCrypto.ShiroStorageHandler
protected static class
EntityCrypto.StorageHandler
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
protected static EntityCrypto.StorageHandler
NormalHashStorageHandler
protected static EntityCrypto.StorageHandler
OldFunnyHashStorageHandler
-
Constructor Summary
Constructors Constructor Description EntityCrypto(Delegator delegator, java.lang.String kekText)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
clearKeyCache()
protected void
createKey(java.lang.String originalKeyName, EntityCrypto.StorageHandler handler, ModelField.EncryptMethod encryptMethod)
java.lang.Object
decrypt(java.lang.String keyName, ModelField.EncryptMethod encryptMethod, java.lang.String encryptedString)
Decrypts a hex encoded String into an Objectprotected java.lang.Object
doDecrypt(java.lang.String keyName, ModelField.EncryptMethod encryptMethod, java.lang.String encryptedString, EntityCrypto.StorageHandler handler)
java.lang.String
encrypt(java.lang.String keyName, java.lang.Object obj)
Deprecated.java.lang.String
encrypt(java.lang.String keyName, ModelField.EncryptMethod encryptMethod, java.lang.Object obj)
Encrypts an Object into an encrypted hex encoded Stringprotected byte[]
findKey(java.lang.String originalKeyName, EntityCrypto.StorageHandler handler)
-
-
-
Field Detail
-
module
public static final java.lang.String module
-
OldFunnyHashStorageHandler
protected static final EntityCrypto.StorageHandler OldFunnyHashStorageHandler
-
NormalHashStorageHandler
protected static final EntityCrypto.StorageHandler NormalHashStorageHandler
-
-
Constructor Detail
-
EntityCrypto
public EntityCrypto(Delegator delegator, java.lang.String kekText) throws EntityCryptoException
- Throws:
EntityCryptoException
-
-
Method Detail
-
clearKeyCache
public void clearKeyCache()
-
encrypt
@Deprecated public java.lang.String encrypt(java.lang.String keyName, java.lang.Object obj) throws EntityCryptoException
Deprecated.Encrypts an Object into an encrypted hex encoded String- Throws:
EntityCryptoException
-
encrypt
public java.lang.String encrypt(java.lang.String keyName, ModelField.EncryptMethod encryptMethod, java.lang.Object obj) throws EntityCryptoException
Encrypts an Object into an encrypted hex encoded String- Throws:
EntityCryptoException
-
decrypt
public java.lang.Object decrypt(java.lang.String keyName, ModelField.EncryptMethod encryptMethod, java.lang.String encryptedString) throws EntityCryptoException
Decrypts a hex encoded String into an Object- Throws:
EntityCryptoException
-
doDecrypt
protected java.lang.Object doDecrypt(java.lang.String keyName, ModelField.EncryptMethod encryptMethod, java.lang.String encryptedString, EntityCrypto.StorageHandler handler) throws GeneralException
- Throws:
GeneralException
-
findKey
protected byte[] findKey(java.lang.String originalKeyName, EntityCrypto.StorageHandler handler) throws EntityCryptoException
- Throws:
EntityCryptoException
-
createKey
protected void createKey(java.lang.String originalKeyName, EntityCrypto.StorageHandler handler, ModelField.EncryptMethod encryptMethod) throws EntityCryptoException
- Throws:
EntityCryptoException
-
-