public final class GiftListEncryptionHelperImpl extends java.lang.Object implements GiftListEncryptionHelper
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copy right field.
|
DEFAULT_CHAR_SET, NAME
Constructor and Description |
---|
GiftListEncryptionHelperImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
generateSalt()
This method generates the salt to be used for creating passwords.
|
boolean |
isMatchingCipherText(byte[] originalPassword,
java.lang.String salt,
java.lang.String password,
boolean matchByOneWayHash)
Checks if the original password matches with the encrypted password
generated from the password and salt that is provided to the method.
|
byte[] |
performOneWayHashEncryption(java.lang.String password,
java.lang.String salt)
This method performs one way hash on a given password using the salt provided.
|
byte[] |
performReversibleEncryption(java.lang.String password,
java.lang.String salt)
Performs reversible encryption on the password.
|
java.lang.String |
reverseEncryptedPassword(byte[] password,
java.lang.String salt)
Decrypt a given password.
|
public static final java.lang.String COPYRIGHT
public boolean isMatchingCipherText(byte[] originalPassword, java.lang.String salt, java.lang.String password, boolean matchByOneWayHash) throws ECException
WebSphere Commerce
is
configured for using one way hashing or reversible encryption based on which the comparison will be made.isMatchingCipherText
in interface GiftListEncryptionHelper
originalPassword
- The password that is already encrypted and stored in the GRUSERAUTH
table.salt
- The salt to be used for encryption.password
- The plain text to be matched.matchByOneWayHash
- boolean to indicate if one way hash encryption is to be used.ECException
public java.lang.String reverseEncryptedPassword(byte[] password, java.lang.String salt)
reverseEncryptedPassword
in interface GiftListEncryptionHelper
password
- the password to be decryptedsalt
- The salt to be used while decryptingpublic java.lang.String generateSalt() throws ECException
generateSalt
in interface GiftListEncryptionHelper
ECException
public byte[] performOneWayHashEncryption(java.lang.String password, java.lang.String salt) throws ECException
performOneWayHashEncryption
in interface GiftListEncryptionHelper
password
- The plain text password.salt
- The salt to be used for encryption.ECException
public byte[] performReversibleEncryption(java.lang.String password, java.lang.String salt) throws ECException
performReversibleEncryption
in interface GiftListEncryptionHelper
password
- The plain text password to be encryptedsalt
- The salt to be used.ECException