forked from albertobsd/keyhunt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
util.h
33 lines (26 loc) · 774 Bytes
/
util.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef CUSTOMUTILH
#define CUSTOMUTILH
typedef struct str_list {
int n;
char **data;
int *lengths;
}List;
typedef struct str_tokenizer {
int current;
int n;
char **tokens;
}Tokenizer;
char *ltrim(char *str, const char *seps);
char *rtrim(char *str, const char *seps);
char *trim(char *str, const char *seps);
int indexOf(char *s,const char **array,int length_array);
int hexchr2bin(char hex, char *out);
int hexs2bin(char *hex, unsigned char *out);
char *tohex(char *ptr,int length);
void tohex_dst(char *ptr,int length,char *dst);
int hasMoreTokens(Tokenizer *t);
char *nextToken(Tokenizer *t);
int isValidHex(char *data);
void freetokenizer(Tokenizer *t);
void stringtokenizer(char *data,Tokenizer *t);
#endif // CUSTOMUTILH