updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
2024-08-04 09:55:01 -05:00
parent 6d152181d3
commit 15cc7b0b87
6 changed files with 208 additions and 27 deletions

View File

@ -84,18 +84,22 @@ auto create_uuid_wstring() -> std::wstring {
#endif // defined(PROJECT_ENABLE_STDUUID)
#if defined(PROJECT_ENABLE_LIBSODIUM)
auto generate_random_string(std::uint16_t length) -> std::string {
auto generate_random_string(std::size_t length) -> std::string {
std::string ret;
ret.resize(length);
for (std::uint16_t i = 0U; i < length; i++) {
for (std::size_t i = 0U; i < length; i++) {
do {
ret[i] = static_cast<char>(generate_random<std::uint8_t>() % 74 + 48);
} while (((ret[i] >= 91) && (ret[i] <= 96)) ||
((ret[i] >= 58) && (ret[i] <= 64)));
} while (((ret.at(i) >= 91) && (ret.at(i) <= 96)) ||
((ret.at(i) >= 58) && (ret.at(i) <= 64)));
}
return ret;
}
auto generate_random_wstring(std::size_t length) -> std::wstring {
return utils::string::from_utf8(generate_random_string(length));
}
#endif // defined(PROJECT_ENABLE_LIBSODIUM)
auto get_environment_variable(std::string_view variable) -> std::string {