Page MenuHomePhabricator

No OneTemporary

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

Mime Type
text/x-diff
Expires
Mon, Dec 23, 7:24 AM (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2690555
Default Alt Text
(935 B)

Event Timeline