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

FreeBSD Manual Pages

  
 
  

home | help
PWSENCODER(3)	       FreeBSD Library Functions Manual		 PWSENCODER(3)

NAME
     pws_passwords_encode, pws_passwords_encodemulti, pws_passwords_len	--
     Functions to encode a password string for storage

LIBRARY
     -lpwstor

SYNOPSIS
     #include <pwstor.h>

     int
     pws_passwords_encode(char *indata,	char *outdata, uint8_t use_b64);

     int
     pws_passwords_encodemulti(char *indata, PasswordData *outdata);

     size_t
     pws_passwords_len(uint8_t use_b64);

DESCRIPTION
     The function pws_passwords_encode() This function returns zero to indi-
     cate success, or non-zero to indicate failure.  The size of outdata
     should be equal to	the return value of pws_passwords_len()	with an	argu-
     ment equal	to the argument	of use_b64 passed to pws_passwords_encode().
     That is, the Base64-encoding settings should be the same.	indata must be
     the password which	you wish to encode.  This function returns zero	to in-
     dicate success, or	non-zero to indicate failure.

     The function pws_passwords_encodemulti() works in a similar fashion, ex-
     cept that instead of storing the data in a	block of memory, it stores it
     in	a valid	PasswordData structure.	 This structure	must be	allocated by
     the caller.  This function	returns	zero to	indicate success, or non-zero
     to	indicate failure.

     The function pws_passwords_len() returns a	value equals to	the size re-
     quired to store a password	string.	 If use_b64 is true, it	returns	the
     amount of space required to store a Base64-encoded	password string	en-
     coded by libpwstor.  If it	is false, it returns the amount	of space re-
     quired to store a libpwstor encoded string	which is not Base64 encoded.

SEE ALSO
     pwstor(3),	pws_passwords_check(3),	pws_passwords_checkmulti(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_encode&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help