mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-07-06 10:13:54 +02:00
use string/string_view for base32
This commit is contained in:
parent
c2f6731296
commit
e0a21cf702
4 changed files with 20 additions and 22 deletions
libi2pd
|
@ -27,8 +27,9 @@ namespace data
|
|||
return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9') || ch == '-' || ch == '~';
|
||||
}
|
||||
|
||||
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);
|
||||
size_t Base32ToByteStream (std::string_view base32Str, uint8_t * outBuf, size_t outLen);
|
||||
std::string ByteStreamToBase32 (const uint8_t * inBuf, size_t len);
|
||||
|
||||
constexpr bool IsBase32 (char ch)
|
||||
{
|
||||
return (ch >= 'a' && ch <= 'z') || (ch >= '2' && ch <= '7');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue