Defines | Enumerations | Functions | Variables

passphrase.c File Reference

#include "wizard/studio.h"
#include "wizard/exception.h"
#include "wizard/exception-private.h"
#include "wizard/memory_.h"
#include "wizard/passphrase.h"

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 StringInfoGetPassphrase (ExceptionInfo *exception)

Variables

static volatile sig_atomic_t signal_number = 0

Define Documentation

#define _PATH_TTY   "/dev/tty"

Referenced by GetPhrase().

#define _T_FLUSH   (TCSAFLUSH)

Referenced by GetPhrase().


Enumeration Type Documentation

Enumerator:
EchoOffMode 
EchoOnMode 
RequireTTYMode 
ForceLowerMode 
ForceUpperMode 
SevenBitMode 
StdinMode 

Function Documentation

WizardExport StringInfo* GetPassphrase ( ExceptionInfo exception  ) 
static WizardBooleanType GetPhrase ( const char *  prompt,
PassphraseMode  flags,
StringInfo phrase 
) [static]
static void SignalHandler ( int  signal  )  [static]

References signal_number.


Variable Documentation

volatile sig_atomic_t signal_number = 0 [static]

Referenced by GetPhrase(), and SignalHandler().