org.ofbiz.entity.util
Class EntityCrypto
java.lang.Object
org.ofbiz.entity.util.EntityCrypto
public class EntityCrypto
- extends java.lang.Object
Method Summary |
java.lang.Object |
decrypt(java.lang.String keyName,
java.lang.String encryptedString)
Decrypts a hex encoded String into an Object |
java.lang.String |
encrypt(java.lang.String keyName,
java.lang.Object obj)
Encrypts an Object into an encrypted hex encoded String |
protected javax.crypto.SecretKey |
getKey(java.lang.String name,
boolean useOldFunnyKeyHash)
|
protected javax.crypto.SecretKey |
getKeyFromStore(java.lang.String originalKeyName,
boolean useOldFunnyKeyHash)
|
protected java.lang.String |
getRandomString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
module
public static final java.lang.String module
delegator
protected GenericDelegator delegator
keyMap
protected java.util.Map<java.lang.String,javax.crypto.SecretKey> keyMap
EntityCrypto
protected EntityCrypto()
EntityCrypto
public EntityCrypto(GenericDelegator delegator)
encrypt
public java.lang.String encrypt(java.lang.String keyName,
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,
java.lang.String encryptedString)
throws EntityCryptoException
- Decrypts a hex encoded String into an Object
- Throws:
EntityCryptoException
getKey
protected javax.crypto.SecretKey getKey(java.lang.String name,
boolean useOldFunnyKeyHash)
throws EntityCryptoException
- Throws:
EntityCryptoException
getKeyFromStore
protected javax.crypto.SecretKey getKeyFromStore(java.lang.String originalKeyName,
boolean useOldFunnyKeyHash)
throws EntityCryptoException
- Throws:
EntityCryptoException
getRandomString
protected java.lang.String getRandomString()