CryptUtil: Utility Class for encryption/decryption of Strings. By default the class uses Triple DES (implementation class TripleDESBase).
TripleDESBase: This class implements symmetric encryption using the TripleDES algorithm using the javax.crypto.* package. By default the class uses a predefined private-key.
Encryption Algorithm: By default the CryptUtil class is using the provided TripleDES implemntation. This can be changed by setting the System-Property: webwarp.util.crypt.symmetricencryption.CLASS. The configured class must hereby implement the Interface SymetricEncryption.
Private Key: By default the TripleDES implementation used by default takes a standard key that is stored in plain text in the Java code. It is highly recommended that you configure the private key to be used. This can be done by setting the System-Property: webwarp.util.crypt.symmetricencryption.TripleDESBase.KEY . The ressource should reference a file that contains the private key to used. The private key must have at least a length of 24 bytes.
import net.sf.webwarp.util.crypt.CryptUtil; [...] String encryptedText = CryptUtil.encrypt("This is a clear text message."); String originalMessage = CryptUtil.decrypt(encryptedText);