mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 08:00:38 +03:00
extend temporary buffer size to 1024
This commit is contained in:
parent
18d9325800
commit
0ee7f02f51
12
Identity.cpp
12
Identity.cpp
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user