public class ERXDESCrypter extends Object implements ERXCrypterInterface
Constructor and Description |
---|
ERXDESCrypter() |
ERXDESCrypter(String secretKeyPathFramework,
String secretKeyPath) |
Modifier and Type | Method and Description |
---|---|
String |
decrypt(String cryptedText)
Base64 decodes and then DES decrypts the passed in string using the
secret key returned by
secretKey . |
String |
decrypt(String cryptedText,
Key secretKey)
Base64 decodes and then DES decrypts the passed in string using the
passed in secret key.
|
protected Key |
defaultSecretKey()
Returns the DES java.security.Key found in the key file.
|
String |
encrypt(String clearText)
DES Encrypts and then base64 encodes the passed in String using the
secret key returned by
secretKey . |
String |
encrypt(String clearText,
Key secretKey)
DES Encrypts and then base64 encodes the passed in String using the
passed in secret key.
|
void |
setSecretKeyPath(String secretKeyPath) |
void |
setSecretKeyPathFramework(String secretKeyPathFramework) |
public void setSecretKeyPathFramework(String secretKeyPathFramework)
public void setSecretKeyPath(String secretKeyPath)
protected Key defaultSecretKey()
public String decrypt(String cryptedText)
secretKey
.decrypt
in interface ERXCrypterInterface
cryptedText
- the string to decryptpublic String decrypt(String cryptedText, Key secretKey)
public String encrypt(String clearText)
secretKey
. The base64 encoding is
performed to ensure that the encrypted string can be stored in places
that don't support extended character sets.encrypt
in interface ERXCrypterInterface
clearText
- the text to encryptCopyright © 2002 – 2020 Project Wonder.