Determines whether 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_sv( Slapi_Value **vals, const Slapi_Value *v );
This function takes the following parameters:
Pointer to the array of Slapi_Value structure pointers to hold the values of an attribute that stores passwords such as userpassword.
Pointer to the Slapi_Value structure containing the password that you wish to check.
This function returns 0 if the password specified by v was found in vals, or a non-zero value if the password v was not found in vals.
You must allocate and release an array of Slapi_Value structures for vals sized to hold the exact number of password values for the userpassword attribute on the entry to check. The resulting array is not NULL terminated. For a simpler memory allocation model, use slapi_pw_find_valueset() instead.
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.