Skip to content

Instantly share code, notes, and snippets.

View mcordova1967's full-sized avatar

Martín Córdova mcordova1967

  • Martín Córdova y Asociados, C.A.
View GitHub Profile
@williamdes
williamdes / base64_encode_decode.cpp
Created June 20, 2017 16:40
c++ 11 encoding and decoding base64
//FROM
//https://stackoverflow.com/a/34571089/5155484
typedef unsigned char uchar;
static const std::string b = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";//=
static std::string base64_encode(const std::string &in) {
std::string out;
int val=0, valb=-6;
for (uchar c : in) {