okapi.util
Class JCrypt

java.lang.Object
  extended by okapi.util.JCrypt

public class JCrypt
extends java.lang.Object

Unix Crypt command in java. See John Dumas's Java Crypt page for the original source, or search for "Eric Young unix crypt" for many other copies. License unclear, believed to be BSD as is Eric Young's version.

Author:
jdumas@zgs.com (John Dumas)

Method Summary
static java.lang.String crypt(java.lang.String salt, java.lang.String original)
          Encrypt a String given the cleartext string and a "salt".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

crypt

public static final java.lang.String crypt(java.lang.String salt,
                                           java.lang.String original)
Encrypt a String given the cleartext string and a "salt".

Parameters:
salt - A two-character String representing the salt used for the encryption.
original - The String to be encrypted.
Returns:
A String consisting of the 2-character salt followed by the encrypted String.


Copyright ? 2001-2009 MIT. All Rights Reserved.