fix(hex): now throws exc if not enough allocated mem

This commit is contained in:
2024-09-16 18:50:34 +03:00
parent 74f2ce503e
commit b586192536
3 changed files with 32 additions and 6 deletions

View File

@ -10,9 +10,9 @@ namespace hex
bool isValid(const char *str) noexcept;
bool isValid(std::string_view str) noexcept;
void encode(const uint8_t *data, size_t data_size, char *str, size_t str_size) noexcept;
void encode(const uint8_t *data, size_t data_size, char *str, size_t str_size);
std::string encode(std::span<const uint8_t> data) noexcept;
void decode(const char *str, size_t str_size, uint8_t *data, size_t data_size);
std::vector<uint8_t> decode(std::string_view str);
std::vector<uint8_t> decode(std::string_view str) noexcept;
}