mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-09-17 01:34:45 +00:00
use base64 from boost::beast for basic authorization
This commit is contained in:
@@ -201,17 +201,6 @@ namespace data
|
||||
return outCount;
|
||||
}
|
||||
|
||||
std::string ToBase64Standard (std::string_view in)
|
||||
{
|
||||
auto str = ByteStreamToBase64 ((const uint8_t *)in.data (), in.length ());
|
||||
// replace '-' by '+' and '~' by '/'
|
||||
for (auto& ch: str)
|
||||
if (ch == '-')
|
||||
ch = '+';
|
||||
else if (ch == '~')
|
||||
ch = '/';
|
||||
return str;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user