org.opends.server.util
Class Crypt

java.lang.Object
  extended by org.opends.server.util.Crypt

@PublicAPI(stability=VOLATILE,
           mayInstantiate=true,
           mayExtend=false,
           mayInvoke=true)
public final class Crypt
extends java.lang.Object

UNIX Crypt cipher, ported from the Sun OpenSolaris project.


Constructor Summary
Crypt()
          Constructor.
 
Method Summary
 byte[] crypt(byte[] pw, byte[] salt)
          Encode the supplied password in unix crypt form with the provided salt.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Crypt

public Crypt()
Constructor.

Method Detail

crypt

public byte[] crypt(byte[] pw,
                    byte[] salt)
Encode the supplied password in unix crypt form with the provided salt.

Parameters:
pw - A password to encode.
salt - A salt array of any size, of which only the first 2 bytes will be considered.
Returns:
A trimmed array