DragonFly On-Line Manual Pages

Search: Section:  


PWSCHECK(3)           DragonFly Library Functions Manual           PWSCHECK(3)

NAME

pws_passwords_check, pws_passwords_checkmulti - Functions to check a given password against an encoded password

LIBRARY

-lpwstor

SYNOPSIS

#include <pwstor.h> int pws_passwords_check(char *chk, const char *real, uint8_t is_b64); int pws_passwords_checkmulti(char *chk, PasswordData *real);

DESCRIPTION

The function pws_passwords_check() will check a given clear-text password stored in chk against a string encoded by libpwstor which is stored in real. If real is Base64 encoded, then is_b64 should be set to true. If not, then is_b64 should be false. This function will return 0 to indicate a non-match, 1 to indicate that the passwords do indeed match, and <0 to indicate a failure. In case of failure, errno can be examined to assist in determining what failed. The EINVAL error indicates that one of the arguments passed to pws_passwords_check() was not in a valid format. The function pws_passwords_checkmulti() returns the same codes as pws_passwords_check() but expects the real argument to be a pointer to a valid PasswordData structure.

SEE ALSO

pwstor(3), pws_passwords_encode(3), pws_passwords_encodemulti(3), pws_passwords_converttomulti(3) DragonFly 6.5-DEVELOPMENT October 23, 2008 DragonFly 6.5-DEVELOPMENT

Search: Section: