From 95b40c0c302e35516e90565b309c60dae2bdf8a3 Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 29 Jan 2014 17:38:53 -0500 Subject: [PATCH] use base64 alphabet directly --- base64.cpp | 5 +++++ base64.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/base64.cpp b/base64.cpp index b75214c9..e731bedc 100644 --- a/base64.cpp +++ b/base64.cpp @@ -27,6 +27,11 @@ namespace data '4', '5', '6', '7', '8', '9', '-', '~' }; + const char * GetBase64SubstitutionTable () + { + return T64; + } + /* * Reverse Substitution Table (built in run time) */ diff --git a/base64.h b/base64.h index d67927e9..47a65def 100644 --- a/base64.h +++ b/base64.h @@ -11,9 +11,9 @@ namespace data size_t ByteStreamToBase64 (const uint8_t * InBuffer, size_t InCount, char * OutBuffer, size_t len); size_t Base64ToByteStream (const char * InBuffer, size_t InCount, uint8_t * OutBuffer, size_t len ); - + const char * GetBase64SubstitutionTable (); + size_t Base32ToByteStream (const char * inBuf, size_t len, uint8_t * outBuf, size_t outLen); - } }