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 StringInfo * | GetPassphrase (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

enum PassphraseMode

Enumerator:

  EchoOffMode |
  EchoOnMode |
  RequireTTYMode |
  ForceLowerMode |
  ForceUpperMode |
  SevenBitMode |
  StdinMode |

## Function Documentation

WizardExport StringInfo* GetPassphrase | ( | ExceptionInfo * | exception | ) |

References AcquireStringInfo(), CompareStringInfo(), DestroyStringInfo(), EchoOffMode, FormatWizardString(), GetPhrase(), GetStringInfoLength(), GetWizardModule, MaxTextExtent, PrintWizardString(), SetStringInfoLength(), STDERR_FILENO, ThrowWizardException(), WizardFalse, and write.

Referenced by AuthenticateSecretKey(), and GenerateSecretKey().

static WizardBooleanType GetPhrase | ( | const char * | prompt,
|  | PassphraseMode | flags,
|  | StringInfo * | phrase |
| ) |  |  | `[static]`

References _PATH_TTY, _T_FLUSH, close, CopyWizardMemory(), EchoOnMode, fileno, ForceLowerMode, ForceUpperMode, getpid, GetStringInfoDatum(), GetStringInfoLength(), MaxTextExtent, open, read, RequireTTYMode, ResetWizardMemory(), SetStringInfoLength(), SevenBitMode, signal_number, STDIN_FILENO, StdinMode, WizardFalse, WizardTrue, and write.

Referenced by GetPassphrase().

static void SignalHandler | ( | int | signal | ) | `[static]`

References signal_number.

## Variable Documentation

volatile sig_atomic_t signal_number = 0`[static]`

Referenced by GetPhrase(), and SignalHandler().