com.samskivert.util
Class Crypt

java.lang.Object
  extended by com.samskivert.util.Crypt

public class Crypt
extends Object

An implementation of the Unix crypt() function.

Based upon C source code written by Eric Young, eay@psych.uq.oz.au


Constructor Summary
Crypt()
           
 
Method Summary
static String crypt(String salt, String original)
          One-way encrypts the supplied string using the supplied salt using the standard crypt() algorithm.
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Crypt

public Crypt()
Method Detail

crypt

public static final String crypt(String salt,
                                 String original)
One-way encrypts the supplied string using the supplied salt using the standard crypt() algorithm.

Parameters:
salt - a two character string used to seed the crypt algorithm. conventionally the first two characters of the original string
original - the string to one-way encrypt

main

public static void main(String[] args)


Copyright © 2000-2008 Michael Bayne. All Rights Reserved.