Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.jcorporate.expresso.core.security.weakencryption
Class StringEncryption  view StringEncryption download StringEncryption.java

java.lang.Object
  extended bycom.jcorporate.expresso.core.security.AbstractStringEncryption
      extended bycom.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.


Field Summary
protected static com.jcorporate.expresso.core.misc.ByteArrayCounter ivCounter
           
private static java.lang.String thisClass
           
 
Fields inherited from class com.jcorporate.expresso.core.security.AbstractStringEncryption
 
Constructor Summary
StringEncryption()
           
 
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 com.jcorporate.expresso.core.security.AbstractStringEncryption
decryptString, destroy, encryptString, getCryptoManager, getPreparedPassKey, init, preparePassKey, setCryptoManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

thisClass

private static final java.lang.String thisClass
See Also:
Constant Field Values

ivCounter

protected static com.jcorporate.expresso.core.misc.ByteArrayCounter ivCounter
Constructor Detail

StringEncryption

public StringEncryption()
                 throws com.jcorporate.expresso.kernel.exception.ChainedException
Method Detail

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.