Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
PWSCHECK(3)	       FreeBSD 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 indi-
     cate 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 for-
     mat.

     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)

FreeBSD	13.0		       October 23, 2008			  FreeBSD 13.0

NAME | LIBRARY | SYNOPSIS | DESCRIPTION | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=pws_passwords_check&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help