| 56 | |
| 57 | |
| 58 | static int get_binary_flag(const char *option, const wchar_t* s, bool& f) |
| 59 | { |
| 60 | |
| 61 | if (wcscmp(s, L"0") == 0 || wcscmp(s, L"1") == 0) { |
| 62 | f = *s == L'1'; |
| 63 | return 0; |
| 64 | } else { |
| 65 | wcerr << L"argument must be 0 or 1 for option " << option << endl; |
| 66 | return -1; |
| 67 | } |
| 68 | |
| 69 | } |
| 70 | |
| 71 | static int get_password(LockZeroBuffer<wchar_t>& password, const wchar_t *password_prompt, const wchar_t *repeat_prompt = nullptr) |
| 72 | { |