Tor  0.4.7.0-alpha-dev
Functions
getpass.c File Reference

Cross-platform wrapper to read passphrases from the terminal. More...

#include "lib/term/getpass.h"
#include "lib/log/util_bug.h"
#include "lib/malloc/malloc.h"
#include "ext/tor_readpassphrase.h"
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

ssize_t tor_getpass (const char *prompt, char *output, size_t buflen)
 

Detailed Description

Cross-platform wrapper to read passphrases from the terminal.

Definition in file getpass.c.

Function Documentation

◆ tor_getpass()

ssize_t tor_getpass ( const char *  prompt,
char *  output,
size_t  buflen 
)

Emit the password prompt prompt, then read up to buflen bytes of passphrase into output. Return the number of bytes in the passphrase, excluding terminating NUL.

Definition at line 50 of file getpass.c.