• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <stdint.h>
2 #include <stddef.h>
3 #include <string.h>
4 
5 #include "../../../include/libbase64.h"
6 #include "../../tables/tables.h"
7 #include "../../codecs.h"
8 #include "config.h"
9 #include "../../env.h"
10 
11 #if BASE64_WORDSIZE == 32
12 #  include "32/enc_loop.c"
13 #elif BASE64_WORDSIZE == 64
14 #  include "64/enc_loop.c"
15 #endif
16 
17 #if BASE64_WORDSIZE >= 32
18 #  include "32/dec_loop.c"
19 #endif
20 
BASE64_ENC_FUNCTION(plain)21 BASE64_ENC_FUNCTION(plain)
22 {
23 	#include "enc_head.c"
24 #if BASE64_WORDSIZE == 32
25 	enc_loop_generic_32(&s, &slen, &o, &olen);
26 #elif BASE64_WORDSIZE == 64
27 	enc_loop_generic_64(&s, &slen, &o, &olen);
28 #endif
29 	#include "enc_tail.c"
30 }
31 
BASE64_DEC_FUNCTION(plain)32 BASE64_DEC_FUNCTION(plain)
33 {
34 	#include "dec_head.c"
35 #if BASE64_WORDSIZE >= 32
36 	dec_loop_generic_32(&s, &slen, &o, &olen);
37 #endif
38 	#include "dec_tail.c"
39 }
40