Class Crypt

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

public final class Crypt extends Object
UNIX Crypt cipher, ported from the Sun OpenSolaris project.
  • Constructor Details

    • Crypt

      public Crypt()
      Constructor.
  • Method Details

    • 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