MDi JLib
1.7.4

com.microdeveloper.security.encryption
Class DesEncrypter

java.lang.Object
  extended by com.microdeveloper.security.encryption.DesEncrypter

public class DesEncrypter
extends Object

A Triple DES with MD5 encryption utility that encrypts and decrypts the given text. This variant uses a pass phrase to perform the encryption. Because the encryption is 156-bit strong, the class is not suitable for export. Additionally, because the passphrase is in the form of text, care should be taken not to expose the passkey during usage.

Since:
1.1
Version:
1.1
Author:
Gregg Lagnese
See Also:
Base64Encrypter

Field Summary
(package private)  com.microdeveloper.security.encryption.DesEncrypter.Wrapper w
           
 
Constructor Summary
DesEncrypter(String passPhrase)
          Creates a new DesEncrypter object and intializes it with the given pass phrase.
 
Method Summary
 String decrypt(String str)
          Decrypts the given text returning the clear text result.
 String encrypt(String str)
          Encrypts the given text returning the encrypted result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

w

com.microdeveloper.security.encryption.DesEncrypter.Wrapper w
Constructor Detail

DesEncrypter

public DesEncrypter(String passPhrase)
Creates a new DesEncrypter object and intializes it with the given pass phrase. All subsequent encryption or decryption operations will use this given passPhrase as long as the DesEncrypter object exists.

Parameters:
passPhrase - secret pass phrase to encode with
Method Detail

encrypt

public String encrypt(String str)
Encrypts the given text returning the encrypted result.

Parameters:
str - clear text to encrypt
Returns:
encrypted text
See Also:
decrypt(String)

decrypt

public String decrypt(String str)
Decrypts the given text returning the clear text result.

Parameters:
str - encrypted text to decrypt
Returns:
clear text
See Also:
encrypt(String)

MDi JLib
1.7.4

Copyright©2001-2007 MicroDeveloper, Inc. All Rights Reserved.