Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(532)

Side by Side Diff: third_party/fips181/fips181.h

Issue 2571113002: Remove unnecessary typedefs in third_party/fips181. (Closed)
Patch Set: Solve for MSVC warning C4805. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/fips181/convert.cc ('k') | third_party/fips181/fips181.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ** This module uses code from the NIST implementation of FIPS-181, 2 ** This module uses code from the NIST implementation of FIPS-181,
3 ** but the algorythm is CHANGED and I think that I CAN 3 ** but the algorythm is CHANGED and I think that I CAN
4 ** copyright it. See copiright notes below. 4 ** copyright it. See copiright notes below.
5 */ 5 */
6 6
7 /* 7 /*
8 ** Copyright (c) 1999, 2000, 2001, 2002, 2003 8 ** Copyright (c) 1999, 2000, 2001, 2002, 2003
9 ** Adel I. Mirzazhanov. All rights reserved 9 ** Adel I. Mirzazhanov. All rights reserved
10 ** 10 **
(...skipping 16 matching lines...) Expand all
27 ** DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 ** DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 ** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 28 ** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
29 ** GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 ** GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 ** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 30 ** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
31 ** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 31 ** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32 ** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 32 ** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33 ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 */ 34 */
35 35
36 36
37 #ifndef APG_PRONPASS_H 37 #ifndef FIPS181_H
38 #define APG_PRONPASS_H» 1 38 #define FIPS181_H» 1
39
40 #ifndef APG_OWN_TYPES_H
41 #include "owntypes.h"
42 #endif /* APG_OWN_TYPES_H */
43 39
44 #define RULE_SIZE (sizeof(rules)/sizeof(struct unit)) 40 #define RULE_SIZE (sizeof(rules)/sizeof(struct unit))
45 #define ALLOWED(flag) (digram[units_in_syllable[current_unit -1]][unit] & (flag)) 41 #define ALLOWED(flag) (digram[units_in_syllable[current_unit -1]][unit] & (flag))
46 42
47 #define MAX_UNACCEPTABLE 20 43 #define MAX_UNACCEPTABLE 20
48 #define MAX_RETRIES (4 * (int) pwlen + RULE_SIZE) 44 #define MAX_RETRIES (4 * (int) pwlen + RULE_SIZE)
49 45
50 #define NOT_BEGIN_SYLLABLE 010 46 #define NOT_BEGIN_SYLLABLE 010
51 #define NO_FINAL_SPLIT 04 47 #define NO_FINAL_SPLIT 04
52 #define VOWEL 02 48 #define VOWEL 02
53 #define ALTERNATE_VOWEL 01 49 #define ALTERNATE_VOWEL 01
54 #define NO_SPECIAL_RULE 0 50 #define NO_SPECIAL_RULE 0
55 51
56 #define BEGIN 0200 52 #define BEGIN 0200
57 #define NOT_BEGIN 0100 53 #define NOT_BEGIN 0100
58 #define BREAK 040 54 #define BREAK 040
59 #define PREFIX 020 55 #define PREFIX 020
60 #define ILLEGAL_PAIR 010 56 #define ILLEGAL_PAIR 010
61 #define SUFFIX 04 57 #define SUFFIX 04
62 #define END 02 58 #define END 02
63 #define NOT_END 01 59 #define NOT_END 01
64 #define ANY_COMBINATION 0 60 #define ANY_COMBINATION 0
65 61
66 #define S_NB 0x01 /* Numeric */ 62 #define S_NB 0x01 /* Numeric */
67 #define S_SS 0x02 /* Special */ 63 #define S_SS 0x02 /* Special */
68 #define S_CL 0x04 /* Capital */ 64 #define S_CL 0x04 /* Capital */
69 #define S_SL 0x08 /* Small */ 65 #define S_SL 0x08 /* Small */
70 #define S_RS 0x10 /* Restricted Symbol*/ 66 #define S_RS 0x10 /* Restricted Symbol*/
71 67
68 #define APG_MAX_PASSWORD_LENGTH 255
69
72 extern int gen_pron_pass (char *word, char* hypenated_word, 70 extern int gen_pron_pass (char *word, char* hypenated_word,
73 USHORT minlen, USHORT maxlen, unsigned int pass_mode); 71 unsigned short minlen, unsigned short maxlen, unsigned int pass_mode);
74 USHORT random_unit (USHORT type); 72 unsigned short random_unit (unsigned short type);
75 USHORT get_random (USHORT minlen, USHORT maxlen); 73 unsigned short get_random (unsigned short minlen, unsigned short maxlen);
76 boolean have_initial_y (USHORT *units, USHORT unit_size); 74 bool have_initial_y (unsigned short *units, unsigned short unit_size);
77 boolean illegal_placement (USHORT *units, USHORT pwlen); 75 bool illegal_placement (unsigned short *units, unsigned short pwlen);
78 boolean improper_word (USHORT *units, USHORT word_size); 76 bool improper_word (unsigned short *units, unsigned short word_size);
79 boolean have_final_split (USHORT *units, USHORT unit_size); 77 bool have_final_split (unsigned short *units, unsigned short unit_size);
80 int gen_word (char *word, char *hyphenated_word, USHORT pwlen, unsigned int pass _mode); 78 int gen_word (char *word, char *hyphenated_word, unsigned short pwlen, unsigned int pass_mode);
81 char »*gen_syllable(char *syllable, USHORT pwlen, USHORT *units_in_syllable, 79 char »*gen_syllable(char *syllable, unsigned short pwlen, unsigned short *unit s_in_syllable,
82 USHORT *syllable_length); 80 unsigned short *syllable_length);
83 81
84 #endif /* APG_PRONPASS_H */ 82 #endif /* FIPS181_H */
OLDNEW
« no previous file with comments | « third_party/fips181/convert.cc ('k') | third_party/fips181/fips181.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698