/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk
89 by Gustav Hartvigsson
* Started working on Threads
1
#ifndef __H_BASE_N__
2
#define __H_BASE_N__
3
4
#include "defs.h"
5
6
BEGIN_DECLS
7
8
/**
9
 * @file
10
 * @defgroup BaseN BaseN
92 by Gustav Hartvigsson
* Woops.
11
 * @addtogroup BaseN
12
 * @{
89 by Gustav Hartvigsson
* Started working on Threads
13
 * https://tools.ietf.org/html/rfc4648
14
 */
15
16
/**
17
 * Encode a Byte array to a Base16 string.
18
 */
19
schar *
20
s_base_16_enc (sbyte * input_data, size_t in_len, size_t * out_len);
93 by Gustav Hartvigsson
* Should prabably track the input size and output size
21
89 by Gustav Hartvigsson
* Started working on Threads
22
/**
23
 * Decode a base16 encoded string into a Byte array.
24
 */
25
sbyte *
26
s_base_16_dec (schar * base16_str, size_t in_len, size_t * out_len);
93 by Gustav Hartvigsson
* Should prabably track the input size and output size
27
89 by Gustav Hartvigsson
* Started working on Threads
28
/**
29
 * Encode a Byte array to a Base16 string.
30
 */
31
schar *
32
s_base_32_enc (sbyte * input_data,size_t in_len, size_t * out_len);
93 by Gustav Hartvigsson
* Should prabably track the input size and output size
33
89 by Gustav Hartvigsson
* Started working on Threads
34
/**
35
 * Decode a base32 encoded string into a Byte array.
90 by Gustav Hartvigsson
* Macros were wrong.
36
 */
89 by Gustav Hartvigsson
* Started working on Threads
37
sbyte *
38
s_base_32_dec (schar * base32_str, size_t in_len, size_t * out_len);
93 by Gustav Hartvigsson
* Should prabably track the input size and output size
39
89 by Gustav Hartvigsson
* Started working on Threads
40
/**
41
 * Encode a Byte array to a Base32 Hex (Extended hex) string.
90 by Gustav Hartvigsson
* Macros were wrong.
42
 */
89 by Gustav Hartvigsson
* Started working on Threads
43
schar *
44
s_base_32_hex_enc (sbyte * input_data, size_t in_len, size_t * out_len);
93 by Gustav Hartvigsson
* Should prabably track the input size and output size
45
89 by Gustav Hartvigsson
* Started working on Threads
46
/**
47
 * Decode a base32 Hex (Extended hex) encoded string into a Byte array.
90 by Gustav Hartvigsson
* Macros were wrong.
48
 */
89 by Gustav Hartvigsson
* Started working on Threads
49
sbyte *
50
s_base_32_hex_dec (schar * base32_str, size_t in_len, size_t * out_len);
93 by Gustav Hartvigsson
* Should prabably track the input size and output size
51
89 by Gustav Hartvigsson
* Started working on Threads
52
/**
53
 * Encode a Byte array to a Base64 string.
90 by Gustav Hartvigsson
* Macros were wrong.
54
 */
89 by Gustav Hartvigsson
* Started working on Threads
55
schar *
56
s_base_64_enc (sbyte * input_data, size_t in_len, size_t * out_len);
93 by Gustav Hartvigsson
* Should prabably track the input size and output size
57
89 by Gustav Hartvigsson
* Started working on Threads
58
/**
59
 * Decode a base64 encoded string into a Byte array.
90 by Gustav Hartvigsson
* Macros were wrong.
60
 */
61
sbyte *
62
s_base_64_dec (schar * base64_str, size_t in_len, size_t * out_len);
93 by Gustav Hartvigsson
* Should prabably track the input size and output size
63
90 by Gustav Hartvigsson
* Macros were wrong.
64
/**
65
 * Encode a byte array into a URI safe Base64 string.
66
 */
67
schar *
68
s_base_64_safe_enc (sbyte * input_data, size_t in_len, size_t * out_len);
93 by Gustav Hartvigsson
* Should prabably track the input size and output size
69
90 by Gustav Hartvigsson
* Macros were wrong.
70
/**
71
 * Decode a URI safe Base64 string into a byte array.
72
 */
73
sbyte *
74
s_base_64_safe_dec (schar * base64_str, size_t in_len, size_t * out_len);
93 by Gustav Hartvigsson
* Should prabably track the input size and output size
75
90 by Gustav Hartvigsson
* Macros were wrong.
76
77
89 by Gustav Hartvigsson
* Started working on Threads
78
/**
79
 * @}
80
 */
81
82
END_DECLS
83
84
#endif __H_BASE_N__
85