blob: 77fd08f732c353713369d9d2f47d14964207e0ca (
plain)
1 /**
2 * upwgen generates random internationalized passwords
3 * Copyright (C) 2019 Aaron Ball <nullspoon@oper.io>
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #include <stdlib.h>
19 #include "i18n_cat.h"
20
21 #define I18N_SETSIZE 1024
22 #define I18N_TYPE_ASCII_LOWER 1000
23 #define I18N_TYPE_ASCII_UPPER 1100
24 #define I18N_TYPE_ASCII_NUMERALS 1200
25 #define I18N_TYPE_ASCII_SYMBOLS 1300
26 #define I18N_TYPE_ONE 2000
27 #define I18N_TYPE_TWO 3000
28 #define I18N_TYPE_THREE 4000
29 #define I18N_TYPE_FOUR 5000
30
31 struct i18n_set {
32 int type;
33 int count;
34 unsigned int chars[I18N_SETSIZE];
35 struct i18n_set* next;
36 };
37
38 struct i18n_set* i18n_set_new(int);
39 struct i18n_set* i18n_set_add(struct i18n_set*, int);
40 struct i18n_set* i18n_set_exists(struct i18n_set*, int);
41 struct i18n_set* i18n_set_rm_type(struct i18n_set*, int);
42 void i18n_set_dump(struct i18n_set*);
43 void i18n_set_free(struct i18n_set*);
|