|
WizardsToolkit
1.0.7
|
#include "wizard/studio.h"#include "wizard/exception.h"#include "wizard/exception-private.h"#include "wizard/memory_.h"#include "wizard/passphrase.h"#include "wizard/utility-private.h"
Go to the source code of this file.
Defines | |
| #define | _T_FLUSH (TCSAFLUSH) |
| #define | _PATH_TTY "/dev/tty" |
Enumerations | |
| enum | PassphraseMode { EchoOffMode = 0x00, EchoOnMode = 0x01, RequireTTYMode = 0x02, ForceLowerMode = 0x04, ForceUpperMode = 0x08, SevenBitMode = 0x10, StdinMode = 0x20 } |
Functions | |
| static void | SignalHandler (int signal) |
| static WizardBooleanType | GetPhrase (const char *prompt, PassphraseMode flags, StringInfo *phrase) |
| WizardExport StringInfo * | GetPassphrase (ExceptionInfo *exception) |
Variables | |
| static volatile sig_atomic_t | signal_number = 0 |
| #define _PATH_TTY "/dev/tty" |
Definition at line 62 of file passphrase.c.
Referenced by GetPhrase().
| #define _T_FLUSH (TCSAFLUSH) |
Definition at line 55 of file passphrase.c.
Referenced by GetPhrase().
| enum PassphraseMode |
| EchoOffMode | |
| EchoOnMode | |
| RequireTTYMode | |
| ForceLowerMode | |
| ForceUpperMode | |
| SevenBitMode | |
| StdinMode |
Definition at line 67 of file passphrase.c.
| WizardExport StringInfo* GetPassphrase | ( | ExceptionInfo * | exception | ) |
Definition at line 295 of file passphrase.c.
References MaxTextExtent, AcquireStringInfo(), FormatLocaleString(), write, STDERR_FILENO, WizardFalse, WizardTrue, GetPhrase(), EchoOffMode, ThrowWizardException(), GetWizardModule, AuthenticateError, CompareStringInfo(), PrintWizardString(), DestroyStringInfo(), SetStringInfoLength(), and GetStringInfoLength().
Referenced by AuthenticateSecretKey(), and GenerateSecretKey().
| static WizardBooleanType GetPhrase | ( | const char * | prompt, |
| PassphraseMode | flags, | ||
| StringInfo * | phrase | ||
| ) | [static] |
Definition at line 126 of file passphrase.c.
References signal_number, STDIN_FILENO, STDERR_FILENO, StdinMode, open_utf8(), _PATH_TTY, RequireTTYMode, WizardFalse, ResetWizardMemory(), CopyWizardMemory(), EchoOnMode, _T_FLUSH, write, SetStringInfoLength(), MaxTextExtent, GetStringInfoDatum(), read, GetStringInfoLength(), SevenBitMode, ForceLowerMode, ForceUpperMode, close, getpid, fileno, and WizardTrue.
Referenced by GetPassphrase().
| static void SignalHandler | ( | int | signal | ) | [static] |
Definition at line 121 of file passphrase.c.
References signal_number.
volatile sig_atomic_t signal_number = 0 [static] |
Definition at line 82 of file passphrase.c.
Referenced by SignalHandler(), GetPhrase(), and WizardSignalHandler().