Class Crypt

java.lang.Object
com.netscape.cms.authentication.Crypt

public class Crypt extends Object
  • Constructor Details

    • Crypt

      public Crypt()
      Create Crypt object with no passwd or salt set. Must use setPasswd() and setSalt() before getEncryptedPasswd().
    • Crypt

      public Crypt(String salt)
      Create a Crypt object with specified salt. Use setPasswd() before getEncryptedPasswd().
      Parameters:
      salt - the salt string for encryption
    • Crypt

      public Crypt(String passwd, String salt)
      Create a Crypt object with specified passwd and salt (often the already encypted passwd). Get the encrypted result with getEncryptedPasswd().
      Parameters:
      passwd - the passwd to encrypt
      salt - the salt string for encryption
  • Method Details

    • getPasswd

      public String getPasswd()
      Retrieve the passwd string currently being encrypted.
      Returns:
      the current passwd string
    • getSalt

      public String getSalt()
      Retrieve the salt string currently being used for encryption.
      Returns:
      the current salt string
    • getEncryptedPasswd

      public String getEncryptedPasswd()
      Retrieve the resulting encrypted string from the current passwd and salt settings.
      Returns:
      the encrypted passwd
    • setPasswd

      public void setPasswd(String passwd)
      Set a new passwd string for encryption. Use getEncryptedPasswd() to retrieve the new result.
      Parameters:
      passwd - the new passwd string
    • setSalt

      public void setSalt(String salt)
      Set a new salt string for encryption. Use getEncryptedPasswd() to retrieve the new result.
      Parameters:
      salt - the new salt string