rapidyaml  0.11.1
parse and emit YAML, and do it fast
base64.hpp File Reference

encoding/decoding for base64. More...

#include "c4/substr.hpp"
#include "c4/blob.hpp"

Go to the source code of this file.

Classes

struct  c4::fmt::base64_wrapper_< CharOrConstChar >
 

Namespaces

 c4
 (Undefined by default) Use shorter error message from checks/asserts: do not show the check condition in the error message.
 
 c4::fmt
 

Typedefs

using c4::fmt::const_base64_wrapper = base64_wrapper_< cbyte >
 a tag type to mark a payload as base64-encoded More...
 
using c4::fmt::base64_wrapper = base64_wrapper_< byte >
 a tag type to mark a payload to be encoded as base64 More...
 

Functions

bool c4::base64_valid (csubstr encoded)
 check that the given buffer is a valid base64 encoding More...
 
size_t c4::base64_encode (substr encoded, cblob data)
 base64-encode binary data. More...
 
size_t c4::base64_decode (csubstr encoded, blob data)
 decode the base64 encoding in the given buffer More...
 
template<class ... Args>
const_base64_wrapper c4::fmt::cbase64 (Args const &...args)
 mark a variable to be written in base64 format More...
 
const_base64_wrapper c4::fmt::cbase64 (csubstr s)
 mark a csubstr to be written in base64 format More...
 
template<class ... Args>
const_base64_wrapper c4::fmt::base64 (Args const &...args)
 mark a variable to be written in base64 format More...
 
const_base64_wrapper c4::fmt::base64 (csubstr s)
 mark a csubstr to be written in base64 format More...
 
template<class ... Args>
base64_wrapper c4::fmt::base64 (Args &... args)
 mark a variable to be read in base64 format More...
 
base64_wrapper c4::fmt::base64 (substr s)
 mark a variable to be read in base64 format More...
 
size_t c4::to_chars (substr buf, fmt::const_base64_wrapper b)
 write a variable in base64 format More...
 
size_t c4::from_chars (csubstr buf, fmt::base64_wrapper *b)
 read a variable in base64 format More...
 

Detailed Description

encoding/decoding for base64.

See also
https://en.wikipedia.org/wiki/Base64
https://www.base64encode.org/

Definition in file base64.hpp.