Integer type name change.
[silc.git] / lib / silcutil / silcutil.h
1 /*
2
3   silcutil.h 
4
5   Author: Pekka Riikonen <priikone@silcnet.org>
6
7   Copyright (C) 1997 - 2002 Pekka Riikonen
8
9   This program is free software; you can redistribute it and/or modify
10   it under the terms of the GNU General Public License as published by
11   the Free Software Foundation; version 2 of the License.
12
13   This program is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   GNU General Public License for more details.
17
18 */
19
20 #ifndef SILCUTIL_H
21 #define SILCUTIL_H
22
23 /* Prototypes */
24 int silc_gets(char *dest, int destlen, const char *src, int srclen, int begin);
25 int silc_check_line(char *buf);
26 char *silc_get_time();
27 char *silc_to_upper(char *string);
28 char *silc_encode_pem(unsigned char *data, SilcUInt32 len);
29 char *silc_encode_pem_file(unsigned char *data, SilcUInt32 data_len);
30 unsigned char *silc_decode_pem(unsigned char *pem, SilcUInt32 pem_len,
31                                SilcUInt32 *ret_len);
32 bool silc_parse_userfqdn(const char *string, char **left, char **right);
33 void silc_parse_command_line(unsigned char *buffer, 
34                              unsigned char ***parsed,
35                              SilcUInt32 **parsed_lens,
36                              SilcUInt32 **parsed_types,
37                              SilcUInt32 *parsed_num,
38                              SilcUInt32 max_args);
39 char *silc_format(char *fmt, ...);
40 char *silc_id_render(void *id, SilcUInt16 type);
41 int silc_string_compare(char *string1, char *string2);
42 char *silc_string_regexify(const char *string);
43 int silc_string_regex_match(const char *regex, const char *string);
44 int silc_string_match(const char *string1, const char *string2);
45 char *silc_get_username();
46 char *silc_get_real_name();
47 SilcUInt32 silc_hash_string(void *key, void *user_context);
48 SilcUInt32 silc_hash_uint(void *key, void *user_context);
49 SilcUInt32 silc_hash_ptr(void *key, void *user_context);
50 SilcUInt32 silc_hash_id(void *key, void *user_context);
51 SilcUInt32 silc_hash_data(void *key, void *user_context);
52 bool silc_hash_string_compare(void *key1, void *key2, void *user_context);
53 bool silc_hash_id_compare(void *key1, void *key2, void *user_context);
54 bool silc_hash_client_id_compare(void *key1, void *key2, void *user_context);
55 bool silc_hash_data_compare(void *key1, void *key2, void *user_context);
56 char *silc_client_chmode(SilcUInt32 mode, const char *cipher, const char *hmac);
57 char *silc_client_chumode(SilcUInt32 mode);
58 char *silc_client_chumode_char(SilcUInt32 mode);
59 int silc_gettimeofday(struct timeval *p);
60 char *silc_fingerprint(const unsigned char *data, SilcUInt32 data_len);
61
62 #endif