updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user