Sun Java System Directory Server Enterprise Edition 6.2 Developer's Guide


Determines whether or not a specified password matches one of the hashed values of an attribute. For example, you can call this function to determine if a given password matches a value in the userpassword attribute.


#include "slapi-plugin.h"
 int slapi_pw_find_valueset(Slapi_Valueset *valset,
    const Slapi_Value *v);


This function takes the following parameters:


Pointer to the Slapi_ValueSet structure containing the values of an attribute that stores passwords such as userpassword .


Pointer to the Slapi_Value structure containing the password to check.

For example, you can get this value from the SLAPI_BIND_CREDENTIALS parameter in the parameter block and create the Slapi_Value using slapi_value_init_berval().


This function returns 0 if the password specified by v was found in valset, or a non-zero value if the password v was not found in valset.


When the server stores the password for an entry in the userpassword attribute, it hashes the password using different schemes.

Use this function to determine if a given password is one of the values of the userpassword attribute. This function determines which password scheme was used to store the password and uses the appropriate comparison function to compare a given value against the hashed values of the userpassword attribute.

See Also