fr.paris.lutece.util.crypto
Class CryptoUtil

java.lang.Object
  extended by fr.paris.lutece.util.crypto.CryptoUtil

public class CryptoUtil
extends java.lang.Object

This class provides some simple functions to encrypt or decrypt data. This implementation is based on the javax.crypto.* API and the Sun implementation. The algoritm used is the DES algorithm (symetric)

Since:
1.2.1

Constructor Summary
CryptoUtil()
           
 
Method Summary
static java.lang.String decrypt(java.lang.String strDataToDecrypt, java.lang.String strKey)
          This function decrypt a given string using the DES algorithm.
static java.lang.String encrypt(java.lang.String strDataToEncrypt, java.lang.String strKey)
          This function encrypt a given string using the DES algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CryptoUtil

public CryptoUtil()
Method Detail

encrypt

public static java.lang.String encrypt(java.lang.String strDataToEncrypt,
                                       java.lang.String strKey)
This function encrypt a given string using the DES algorithm.

Parameters:
strDataToEncrypt - The String to encrypt
strKey - The generated key used to encrypt
Returns:
The encrypted string

decrypt

public static java.lang.String decrypt(java.lang.String strDataToDecrypt,
                                       java.lang.String strKey)
This function decrypt a given string using the DES algorithm.

Parameters:
strDataToDecrypt - The String to decrypt
strKey - The generated key used to decrypt
Returns:
The encrypted string


Copyright © 2007 Mairie de Paris. All Rights Reserved.