Skip to content

Instantly share code, notes, and snippets.

@d0uji
Created December 6, 2016 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d0uji/1688a09937a5dd2fc15e3f0ee2530d7c to your computer and use it in GitHub Desktop.
Save d0uji/1688a09937a5dd2fc15e3f0ee2530d7c to your computer and use it in GitHub Desktop.
#include "base64.h"
#include <iostream>
#include <windows.h>
int main() {
const std::string s = "Димас - ананас";
SetConsoleOutputCP(1251);
std::string encoded = base64_encode(reinterpret_cast<const unsigned char*>(s.c_str()), s.length());
std::string decoded = base64_decode(encoded);
std::cout << "encoded: " << encoded << std::endl;
std::cout << "decoded: " << decoded << std::endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment