mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 04:04:16 +00:00
use base64 alphabet directly
This commit is contained in:
parent
95b40c0c30
commit
c361b7d914
@ -191,16 +191,15 @@ namespace data
|
|||||||
}
|
}
|
||||||
|
|
||||||
// list of chars might appear in base64 string
|
// list of chars might appear in base64 string
|
||||||
const char * chars = GetBase64SubstitutionTable ();
|
const char * chars = GetBase64SubstitutionTable (); // 64 bytes
|
||||||
boost::filesystem::path suffix;
|
boost::filesystem::path suffix;
|
||||||
while (*chars)
|
for (int i = 0; i < 64; i++)
|
||||||
{
|
{
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
suffix = std::string ("/r") + *chars;
|
suffix = std::string ("/r") + chars[i];
|
||||||
#else
|
#else
|
||||||
suffix = std::string ("\\r") + *chars;
|
suffix = std::string ("\\r") + chars[i];
|
||||||
#endif
|
#endif
|
||||||
chars++;
|
|
||||||
if (!boost::filesystem::create_directory( boost::filesystem::path (p / suffix) )) return false;
|
if (!boost::filesystem::create_directory( boost::filesystem::path (p / suffix) )) return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user