feat(docs): base58.hpp

This commit is contained in:
2024-09-22 22:00:13 +03:00
parent 5b76028d8a
commit e28d103da0
4 changed files with 34 additions and 7 deletions

View File

@ -21,6 +21,7 @@ namespace base64
/**
* @throw std::length_error if not enough allocated length
* @warning contain leading zeros, returns count of them
*/
void encode(const uint8_t *data, uint64_t data_size, char *str, uint64_t str_size);
std::string encode(std::span<const uint8_t> data) noexcept;
@ -29,6 +30,7 @@ namespace base64
* @throw std::length_error if not enough allocated length
* @throw std::logic_error if out of digits map
* @throw std::logic_error if incorrect padding
* @warning contain leading zeros, returns count of them
*/
void decode(const char *str, uint64_t str_size, uint8_t *data, uint64_t data_size);
std::vector<uint8_t> decode(std::string_view str) noexcept;