public abstract class ERXAbstractBlowfishCrypter extends Object implements ERXCrypterInterface
| Constructor and Description |
|---|
ERXAbstractBlowfishCrypter() |
| Modifier and Type | Method and Description |
|---|---|
int |
blockSize()
Returns the block size for this cipher.
|
protected Cipher |
createBlowfishCipher(int mode)
Creates a blowfish cipher for a given mode.
|
String |
decrypt(String cryptedText)
Decodes a blowfish encoded string.
|
protected Cipher |
decryptCipher()
Method used to return the shared instance of the blowfish decryption
cipher.
|
String |
encrypt(String clearText)
Blowfish encodes a given string using the secret key specified in the
System property: ERBlowfishCipherKey.
|
protected Cipher |
encryptCipher()
Method used to return the shared instance of the blowfish encryption
cipher.
|
protected abstract Key |
secretBlowfishKey()
Returns the secret key to use for this cipher.
|
void |
setBlockSize(int blockSize)
Sets the block size to use for this cipher.
|
public void setBlockSize(int blockSize)
blockSize - the block size to use for this cipherpublic int blockSize()
protected abstract Key secretBlowfishKey() throws Exception
Exceptionprotected Cipher createBlowfishCipher(int mode)
mode - of the cipher (encrypting or decrypting)secretKey from the above method.protected Cipher encryptCipher()
protected Cipher decryptCipher()
public String decrypt(String cryptedText)
blowfishEncode.decrypt in interface ERXCrypterInterfacecryptedText - blowfish encoded string to be decodedpublic String encrypt(String clearText)
blowfishDecode. The resultant string from
encoding a string is safe for use in urls and cookies.encrypt in interface ERXCrypterInterfaceclearText - string to be encryptedCopyright © 2002 – 2020 Project Wonder.