anon.crypto
Interface ICrypt

All Known Implementing Classes:
DESCrypt, MD5Crypt

public interface ICrypt

Provides methods that implement the Unix crypt command for creation of password hashes.


Method Summary
 java.lang.String crypt(java.lang.String a_password)
          Creates a UNIX/BSD/Linux-compatible hash value from a password String.
 java.lang.String crypt(java.lang.String a_password, java.lang.String a_salt)
          Creates a UNIX/BSD/Linux-compatible hash value from a password String and a salt value.
 

Method Detail

crypt

java.lang.String crypt(java.lang.String a_password)
                       throws java.security.NoSuchAlgorithmException
Creates a UNIX/BSD/Linux-compatible hash value from a password String.

Parameters:
a_password - a password as String
Returns:
a hash value for the password
Throws:
java.security.NoSuchAlgorithmException - if the hash algorithm is not available on the current system

crypt

java.lang.String crypt(java.lang.String a_password,
                       java.lang.String a_salt)
                       throws java.security.NoSuchAlgorithmException
Creates a UNIX/BSD/Linux-compatible hash value from a password String and a salt value. The maximum length of the salt may vary with the algorithm

Parameters:
a_password - a password as String
a_salt - a salt as String; the maximum length may vary
Returns:
a hash value for the password
Throws:
java.security.NoSuchAlgorithmException - if the hash algorithm is not available on the current system