add cpp_base64

This commit is contained in:
Erwin Coumans
2020-05-06 22:49:09 +00:00
parent 4ab592dab1
commit 298ee24f0e
5 changed files with 329 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
//
// base64 encoding and decoding with C++.
// Version: 2.rc.00 (release candidate)
//
#ifndef BASE64_H_C0CE2A47_D10E_42C9_A27C_C883944E704A
#define BASE64_H_C0CE2A47_D10E_42C9_A27C_C883944E704A
#include <string>
std::string base64_encode (std::string const& s, bool url = false);
std::string base64_encode_pem (std::string const& s);
std::string base64_encode_mime(std::string const& s);
std::string base64_decode(std::string const& encoded_string, bool remove_linebreaks = false)
std::string base64_encode(unsigned char const*, unsigned int len, bool url = false);
#endif /* BASE64_H_C0CE2A47_D10E_42C9_A27C_C883944E704A */