java.lang.Object
com.jcorporate.expresso.core.security.AbstractStringEncryption
com.jcorporate.expresso.core.security.weakencryption.StringEncryption
- public class StringEncryption
- extends com.jcorporate.expresso.core.security.AbstractStringEncryption
This class provides basic string encryption. It'll provide the services of
password whitening and automatic selection of encryption.
Known Vulnerabilities. The actual whitened password remains in memory for
performance sake. An attacker may find the actual password by looking at swap
files looking for Base64 encoded strings. (Not too hard to grep out) but it requires
an attacker to gain access to the swap partition of the server. Do not use this
class for a personal encryption program.
|
Method Summary |
byte[] |
decrypt(byte[] inputData)
Same as decryptString, but only deals in byte arrays. |
byte[] |
encrypt(byte[] inputData)
Same as encryptString, but only deals in byte arrays. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
thisClass
private static final java.lang.String thisClass
- See Also:
- Constant Field Values
ivCounter
protected static com.jcorporate.expresso.core.misc.ByteArrayCounter ivCounter
StringEncryption
public StringEncryption()
throws com.jcorporate.expresso.kernel.exception.ChainedException
decrypt
public byte[] decrypt(byte[] inputData)
throws com.jcorporate.expresso.kernel.exception.ChainedException,
java.lang.IllegalArgumentException
- Same as decryptString, but only deals in byte arrays. This method must be
implemented by descendants of this class.
encrypt
public byte[] encrypt(byte[] inputData)
throws com.jcorporate.expresso.kernel.exception.ChainedException,
java.lang.IllegalArgumentException
- Same as encryptString, but only deals in byte arrays. This must be implemented
by the descendants of this class.