extend temporary buffer size to 1024

This commit is contained in:
orignal 2014-12-11 12:22:22 -05:00
parent 18d9325800
commit 0ee7f02f51

View File

@ -226,17 +226,17 @@ namespace data
size_t IdentityEx::FromBase64(const std::string& s) size_t IdentityEx::FromBase64(const std::string& s)
{ {
uint8_t buf[512]; uint8_t buf[1024];
auto len = Base64ToByteStream (s.c_str(), s.length(), buf, 512); auto len = Base64ToByteStream (s.c_str(), s.length(), buf, 1024);
return FromBuffer (buf, len); return FromBuffer (buf, len);
} }
std::string IdentityEx::ToBase64 () const std::string IdentityEx::ToBase64 () const
{ {
uint8_t buf[512]; uint8_t buf[1024];
char str[1024]; char str[1536];
size_t l = ToBuffer (buf, 512); size_t l = ToBuffer (buf, 1024);
size_t l1 = i2p::data::ByteStreamToBase64 (buf, l, str, 1024); size_t l1 = i2p::data::ByteStreamToBase64 (buf, l, str, 1536);
str[l1] = 0; str[l1] = 0;
return std::string (str); return std::string (str);
} }