root: macro: crypto: namespace refactor into common

This commit is contained in:
2024-07-20 22:16:54 -07:00
parent c3aee1dee8
commit 5c47cee552
2 changed files with 15 additions and 8 deletions

View File

@@ -344,20 +344,22 @@ class Random final
});
namespace common = ::docker_finance::macro::common;
const std::string timestamp{common::make_timestamp()};
data.title = "Botan_RNG_" + timestamp;
random(
data, []() -> uint32_t { return crypto::botan::g_Random->generate(); });
random(data, []() -> uint32_t {
return common::crypto::botan::g_Random->generate();
});
data.title = "Crypto++_RNG_" + timestamp;
random(data, []() -> uint32_t {
return crypto::cryptopp::g_Random->generate();
return common::crypto::cryptopp::g_Random->generate();
});
data.title = "libsodium_RNG_" + timestamp;
random(data, []() -> uint32_t {
return crypto::libsodium::g_Random->generate();
return common::crypto::libsodium::g_Random->generate();
});
// TODO(unassigned): when clicking reload to create another sample, it doesn't do a clean refresh of the canvas