Webwarp Util Crypt

General

Provides some trivial  facade implementations for symmetric encrpytion of strings using the JAVA Cryptographic API..

Class Overview

Using the Crypt Package

Configuring Defaults

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.


Enrcrypt and decrypt

Following a short example how to use  the package:

import net.sf.webwarp.util.crypt.CryptUtil; [...] String encryptedText = CryptUtil.encrypt("This is a clear text message."); String originalMessage = CryptUtil.decrypt(encryptedText);

Webwarp Util