54#if defined(HAVE_READPASSPHRASE)
55 char *pwd = readpassphrase(prompt, output, buflen, RPP_ECHO_OFF);
66 wchar_t *buf = tor_calloc(buflen,
sizeof(
wchar_t));
68 wchar_t *ptr = buf, *lastch = buf + buflen - 1;
69 while (ptr < lastch) {
70 wint_t ch = _getwch();
94#ifndef WC_ERR_INVALID_CHARS
95#define WC_ERR_INVALID_CHARS 0x80
99 r = WideCharToMultiByte(CP_UTF8,
100 WC_NO_BEST_FIT_CHARS|WC_ERR_INVALID_CHARS,
102 output, (
int)(buflen-1),
114 SecureZeroMemory(buf,
sizeof(
wchar_t)*buflen);
118#error "No implementation for tor_getpass found!"