"Fossies" - the Fresh Open Source Software Archive

Member "pwgen-2.08/pwgen.h" (7 Aug 2017, 1147 Bytes) of package /linux/privat/pwgen-2.08.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "pwgen.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.07_vs_2.08.

    1 /*
    2  * pwgen.h --- header file for password generator
    3  *
    4  * Copyright (C) 2001,2002 by Theodore Ts'o
    5  * 
    6  * This file may be distributed under the terms of the GNU Public
    7  * License.
    8  */
    9 
   10 struct pw_element {
   11     const char  *str;
   12     int     flags;
   13 };
   14 
   15 /*
   16  * Flags for the pw_element
   17  */
   18 #define CONSONANT   0x0001
   19 #define VOWEL       0x0002
   20 #define DIPTHONG    0x0004
   21 #define NOT_FIRST   0x0008
   22 
   23 /*
   24  * Flags for the pwgen function
   25  */
   26 #define PW_DIGITS   0x0001  /* At least one digit */
   27 #define PW_UPPERS   0x0002  /* At least one upper letter */
   28 #define PW_SYMBOLS  0x0004
   29 #define PW_AMBIGUOUS    0x0008
   30 #define PW_NO_VOWELS    0x0010
   31 
   32 /* pointer to choose between random or sha1 pseudo random number generator */
   33 extern int (*pw_number)(int max_num);
   34 
   35 extern const char *pw_symbols;
   36 extern const char *pw_ambiguous;
   37 
   38 /* Function prototypes */
   39 
   40 /* pw_phonemes.c */
   41 extern void pw_phonemes(char *buf, int size, int pw_flags, char *remove);
   42 
   43 /* pw_rand.c */
   44 extern void pw_rand(char *buf, int size, int pw_flags, char *remove);
   45 
   46 /* randnum.c */
   47 extern int pw_random_number(int max_num);
   48 
   49 /* sha1num.c */
   50 extern void pw_sha1_init(char *sha1);
   51 extern int pw_sha1_number(int max_num);