|
1
|
1 #pragma once
|
|
|
2
|
|
|
3 namespace pfc {
|
|
|
4 class string_base;
|
|
|
5 void base64_encode(pfc::string_base & out, const void * in, t_size inSize);
|
|
|
6 void base64_encode_append(pfc::string_base & out, const void * in, t_size inSize);
|
|
|
7 void base64_encode_from_string( pfc::string_base & out, const char * in );
|
|
|
8 t_size base64_decode_estimate(const char * text);
|
|
|
9 void base64_decode(const char * text, void * out);
|
|
|
10 mem_block base64_decode(const char* text);
|
|
|
11
|
|
|
12 template<typename t_buffer> void base64_decode_array(t_buffer & out, const char * text) {
|
|
|
13 PFC_STATIC_ASSERT( sizeof(out[0]) == 1 );
|
|
|
14 out.set_size_discard( base64_decode_estimate(text) );
|
|
|
15 base64_decode(text, out.get_ptr());
|
|
|
16 }
|
|
|
17
|
|
|
18 void base64_decode_to_string( pfc::string_base & out, const char * text );
|
|
|
19 }
|