com.swfit.core.util
Class JavaCrypt

java.lang.Object
  |
  +--com.swfit.core.util.JavaCrypt

public class JavaCrypt
extends java.lang.Object

Since:
SWFIT1.0
Version:
$Revision: 1.2 $ $Date: 2003/02/22 01:06:08 $
Author:
Eric Young (original C code), John H. Dumas (java port), Olaf Havnes (added a few line breaks)

Method Summary
static boolean compareMediumString(java.lang.String password, java.lang.String encrypted)
          Compares an encrypted String to the clear text equivalent.
static boolean compareShortString(java.lang.String password, java.lang.String encrypted)
          Compares an encrypted String to the clear text equivalent.
static java.lang.String encryptMediumString(java.lang.String medium_string)
          Encrypts a medium short String by chopping it up in multiples of eight characters, using the two first characters in each block as salt.
static java.lang.String encryptShortString(java.lang.String short_string)
          Encrypts a short String (password) using the two first characters as salt.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

encryptShortString

public static final java.lang.String encryptShortString(java.lang.String short_string)
Encrypts a short String (password) using the two first characters as salt. Afterwards chops off the salt - (hopefully) making this a one-way encryption scheme.

compareShortString

public static final boolean compareShortString(java.lang.String password,
                                               java.lang.String encrypted)
Compares an encrypted String to the clear text equivalent.

encryptMediumString

public static final java.lang.String encryptMediumString(java.lang.String medium_string)
Encrypts a medium short String by chopping it up in multiples of eight characters, using the two first characters in each block as salt. Afterwards chops off the salt - (hopefully) making this a one-way encryption scheme. This is propably a very cumbersome way of doing it.

compareMediumString

public static final boolean compareMediumString(java.lang.String password,
                                                java.lang.String encrypted)
Compares an encrypted String to the clear text equivalent.


Swfit developer homepage
Copyright © 2003 Orgdot AS. All Rights Reserved.