Skip to content
Snippets Groups Projects
Commit 6475b80e authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Cache random_device

This should fix #171
parent e697c12c
No related branches found
No related tags found
No related merge requests found
......@@ -58,7 +58,7 @@ mtx::client::utils::random_token(uint8_t len, bool with_symbols) noexcept
const auto chars = with_symbols ? alphanumberic + symbols : alphanumberic;
std::random_device rng;
thread_local std::random_device rng;
std::uniform_int_distribution<> index_dist(0, chars.size() - 1);
std::string token;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment