Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3509688
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
935 B
Referenced Files
None
Subscribers
None
View Options
diff --git a/native/cpp/CommonCpp/CryptoTools/Tools.cpp b/native/cpp/CommonCpp/CryptoTools/Tools.cpp
index 070a38d18..abbe4de25 100644
--- a/native/cpp/CommonCpp/CryptoTools/Tools.cpp
+++ b/native/cpp/CommonCpp/CryptoTools/Tools.cpp
@@ -1,23 +1,23 @@
#include "Tools.h"
#include "PlatformSpecificTools.h"
#include <string>
namespace comm {
namespace crypto {
std::string Tools::generateRandomString(size_t size) {
static std::string availableSigns =
- " 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ " 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_";
std::string result;
OlmBuffer buff;
PlatformSpecificTools::generateSecureRandomBytes(buff, size);
for (size_t i = 0; i < size; ++i) {
std::uint8_t rand = buff[i] % availableSigns.size();
result.push_back(availableSigns[rand]);
}
return result;
}
} // namespace crypto
} // namespace comm
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Dec 23, 7:24 AM (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2690555
Default Alt Text
(935 B)
Attached To
Mode
rCOMM Comm
Attached
Detach File
Event Timeline
Log In to Comment