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

slapi_pw_find_valueset()

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.

Syntax

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

Parameters

This function takes the following parameters:

valset

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

v

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().

Returns

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.

Description

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

slapi_pw_find_sv()