Add vitastor-cli create & modify --enc-key parameter

This commit is contained in:
Vitaliy Filippov
2026-04-17 13:53:40 +03:00
parent cc6e531410
commit 64a8cd1f4b
8 changed files with 147 additions and 23 deletions
+14
View File
@@ -565,3 +565,17 @@ std::string tohexstr(const uint8_t *from, size_t bytes)
}
return res;
}
bool ishexstr(const std::string & str)
{
if (str.size() % 2)
return false;
for (auto & c: str)
{
if ((c < '0' || c > '9') &&
(c < 'a' || c > 'f') &&
(c < 'A' || c > 'F'))
return false;
}
return true;
}