Macaw OS C reference

Function nest_get

#include <macaw.h>
int nest_get(
    const char *service,
    const char *account,
    char *buf,
    int size
);

Reads back a password your program saved with nest_set. One saved with nest_keep isn't here: that goes in the system's keychain, and your program has it back with nest_request.

Parameters

serviceconst char *
What the password is for.
accountconst char *
Whose password it is. NULL is the same as "".
bufchar *
Where the password goes. Never print it or save it anywhere else.
sizeint
How many bytes buf holds. A password that doesn't fit is cut short.

Returns int

The password's whole length, or -1 if there isn't one saved.

In Saved passwords (Nestchain), with nest_set, nest_has, nest_remove, nest_list, nest_listitem, nest_listlabel, nest_listchanged, nest_request, nest_choose, nest_keep.