add base64 buffer encoding bounds checking

This commit is contained in:
Jeff Becker 2016-02-05 08:44:09 -05:00
parent 98d5e0b56d
commit d0ea59c568
No known key found for this signature in database
GPG key ID: AB950234D6EA286B
3 changed files with 30 additions and 11 deletions

5
Base.h
View file

@ -17,6 +17,11 @@ namespace data
size_t Base32ToByteStream (const char * inBuf, size_t len, uint8_t * outBuf, size_t outLen);
size_t ByteStreamToBase32 (const uint8_t * InBuf, size_t len, char * outBuf, size_t outLen);
/**
Compute the size for a buffer to contain encoded base64 given that the size of the input is input_size bytes
*/
size_t Base64EncodingBufferSize(const size_t input_size);
template<int sz>
class Tag
{