com.elasticpath.commons.util.security.impl
Class StringEncrypterImpl
java.lang.Object
com.elasticpath.commons.util.security.impl.StringEncrypterImpl
- All Implemented Interfaces:
- StringEncrypter
- Direct Known Subclasses:
- CreditCardEncrypterImpl
public class StringEncrypterImpl
- extends java.lang.Object
- implements StringEncrypter
General encryption/decryption class. Uses an encryption key and scheme
configured in commerce-config.xml.
See: http://www.msblabs.org/aes-crypt/AES.java for additional details.
Method Summary |
java.lang.String |
decrypt(java.lang.String encryptedString)
Decrypts a give string. |
java.lang.String |
encrypt(java.lang.String unencryptedString)
Encrypts a given string. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringEncrypterImpl
public StringEncrypterImpl()
decrypt
public java.lang.String decrypt(java.lang.String encryptedString)
- Decrypts a give string.
- Specified by:
decrypt
in interface StringEncrypter
- Parameters:
encryptedString
- -
the string to decrypt
- Returns:
- the decrypted string
encrypt
public java.lang.String encrypt(java.lang.String unencryptedString)
- Encrypts a given string.
- Specified by:
encrypt
in interface StringEncrypter
- Parameters:
unencryptedString
- -
the string to encrypt
- Returns:
- the encrypted string