com.pelzer.util
Class UnixCrypt
java.lang.Object
com.pelzer.util.UnixCrypt
public class UnixCrypt
- extends Object
UnixCrypt is a class to implement password encryption as used on Unix
systems. It is compatible with the crypt(3c) system function. This version is
a based on the DES encryption algorithm in Andrew Tanenbaum's book "Computer
Networks". It was rewritten in C and used in Perl release 4.035. This version
was rewritten in Java by David Scott, Siemens Ltd., Australia.
For further details on the methods in this class, refer to the Unix man pages
for crypt(3c).
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnixCrypt
public UnixCrypt()
crypt
public static String crypt(String strpw,
String strsalt)
- Returns a String containing the encrypted passwd
- Parameters:
strpw - A String containing the un-encrypted passwordstrsalt - A 2 character String, containing the salt to encrypt the password
with.
Copyright © 2012. All Rights Reserved.