arlut.csd.ganymede
Interface pass_field

All Superinterfaces:
db_field, java.rmi.Remote
All Known Implementing Classes:
PasswordDBField

public interface pass_field
extends db_field


Method Summary
 boolean allowed(char c)
          Convenience method to identify if a particular character is acceptable in this field.
 java.lang.String allowedChars()
          Returns a string containing the list of acceptable characters.
 boolean crypted()
          Returns true if the password stored in this field is hash-crypted.
 java.lang.String disallowedChars()
          Returns a string containing the list of forbidden characters for this field.
 boolean matchPlainText(java.lang.String text)
          This method is used for authenticating a provided plaintext password against the stored contents of this password field.
 int maxSize()
           
 int minSize()
           
 ReturnVal setCryptPass(java.lang.String text)
          This method is used to set a pre-crypted password for this field.
 ReturnVal setMD5CryptedPass(java.lang.String text)
          This method is used to set a pre-crypted OpenBSD-style MD5Crypt password for this field.
 ReturnVal setPlainTextPass(java.lang.String text)
          This method is used to set the password for this field, crypting it in various ways if this password field is stored crypted.
 ReturnVal setWinCryptedPass(java.lang.String LANMAN, java.lang.String NTUnicodeMD4)
          This method is used to set pre-crypted Windows-style password hashes for this field.
 
Methods inherited from interface arlut.csd.ganymede.db_field
addElement, addElements, containsElement, deleteAllElements, deleteElement, deleteElement, deleteElements, getComment, getElement, getEncodingString, getFieldInfo, getFieldTemplate, getID, getName, getType, getTypeDesc, getValue, getValues, getValueString, isBuiltIn, isDefined, isEditable, isEditInPlace, isVector, isVisible, setElement, setValue, size
 

Method Detail

maxSize

public int maxSize()
            throws java.rmi.RemoteException

minSize

public int minSize()
            throws java.rmi.RemoteException

allowedChars

public java.lang.String allowedChars()
                              throws java.rmi.RemoteException
Returns a string containing the list of acceptable characters. If the string is null, it should be interpreted as meaning all characters not listed in disallowedChars() are allowable by default.

disallowedChars

public java.lang.String disallowedChars()
                                 throws java.rmi.RemoteException
Returns a string containing the list of forbidden characters for this field. If the string is null, it should be interpreted as meaning that no characters are specifically disallowed.

allowed

public boolean allowed(char c)
                throws java.rmi.RemoteException
Convenience method to identify if a particular character is acceptable in this field.

crypted

public boolean crypted()
                throws java.rmi.RemoteException
Returns true if the password stored in this field is hash-crypted.

matchPlainText

public boolean matchPlainText(java.lang.String text)
                       throws java.rmi.RemoteException

This method is used for authenticating a provided plaintext password against the stored contents of this password field. The password field may have stored the password in plaintext, or in any of a variety of cryptographic hash formats. matchPlainText() will perform whatever operation on the provided plaintext as is required to determine whether or not it matches with the stored password data.

Returns:
true if the given plaintext matches the stored password

setPlainTextPass

public ReturnVal setPlainTextPass(java.lang.String text)
                           throws java.rmi.RemoteException

This method is used to set the password for this field, crypting it in various ways if this password field is stored crypted.


setCryptPass

public ReturnVal setCryptPass(java.lang.String text)
                       throws java.rmi.RemoteException

This method is used to set a pre-crypted password for this field. This method will return false if this password field is not stored crypted.


setMD5CryptedPass

public ReturnVal setMD5CryptedPass(java.lang.String text)
                            throws java.rmi.RemoteException

This method is used to set a pre-crypted OpenBSD-style MD5Crypt password for this field. This method will return false if this password field is not stored crypted.


setWinCryptedPass

public ReturnVal setWinCryptedPass(java.lang.String LANMAN,
                                   java.lang.String NTUnicodeMD4)
                            throws java.rmi.RemoteException

This method is used to set pre-crypted Windows-style password hashes for this field. These strings are formatted as used in Samba's encrypted password files. This method will return an error code if this password field is not configured to accept Windows-hashed password strings.