DragonFly On-Line Manual Pages

Search: Section:  


PWSENCODER(3)         DragonFly 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 indicate success, or non-zero to indicate failure. The size of outdata should be equal to the return value of pws_passwords_len() with an argument 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 indicate success, or non-zero to indicate failure. The function pws_passwords_encodemulti() works in a similar fashion, except 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 required to store a password string. If use_b64 is true, it returns the amount of space required to store a Base64-encoded password string encoded by libpwstor. If it is false, it returns the amount of space required 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) DragonFly 6.5-DEVELOPMENT October 23, 2008 DragonFly 6.5-DEVELOPMENT

Search: Section: