|
Project Wonder 5.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecter.extensions.crypting.ERXAbstractBlowfishCrypter
public abstract class ERXAbstractBlowfishCrypter
ERXAbstractBlowfishCrypter is a blowfish implementation of the crypter interface that allows subclasses to override the source of the blowfish key. The blowfish cipher is a two-way cipher meaning the original string that was encrypted can be retrieved. The way that this version of the blowfish cipher is encrypted it is safe to use as a form value.
Field Summary | |
---|---|
static org.apache.log4j.Logger |
log
|
Constructor Summary | |
---|---|
ERXAbstractBlowfishCrypter()
|
Method Summary | |
---|---|
int |
blockSize()
Returns the block size for this cipher. |
protected javax.crypto.Cipher |
createBlowfishCipher(int mode)
Creates a blowfish cipher for a given mode. |
java.lang.String |
decrypt(java.lang.String cryptedText)
Decodes a blowfish encoded string. |
protected javax.crypto.Cipher |
decryptCipher()
Method used to return the shared instance of the blowfish decryption cipher. |
java.lang.String |
encrypt(java.lang.String clearText)
Blowfish encodes a given string using the secret key specified in the System property: ERBlowfishCipherKey. |
protected javax.crypto.Cipher |
encryptCipher()
Method used to return the shared instance of the blowfish encryption cipher. |
protected abstract java.security.Key |
secretBlowfishKey()
Returns the secret key to use for this cipher. |
void |
setBlockSize(int blockSize)
Sets the block size to use for this cipher. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.log4j.Logger log
Constructor Detail |
---|
public ERXAbstractBlowfishCrypter()
Method Detail |
---|
public void setBlockSize(int blockSize)
blockSize
- the block size to use for this cipherpublic int blockSize()
protected abstract java.security.Key secretBlowfishKey() throws java.lang.Exception
java.lang.Exception
protected javax.crypto.Cipher createBlowfishCipher(int mode)
mode
- of the cipher (encrypting or decrypting)
secretKey
from the above method.protected javax.crypto.Cipher encryptCipher()
protected javax.crypto.Cipher decryptCipher()
public java.lang.String decrypt(java.lang.String cryptedText)
blowfishEncode
.
decrypt
in interface ERXCrypterInterface
cryptedText
- blowfish encoded string to be decoded
public java.lang.String encrypt(java.lang.String clearText)
blowfishDecode
. The resultant string from
encoding a string is safe for use in urls and cookies.
encrypt
in interface ERXCrypterInterface
clearText
- string to be encrypted
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |