fix(types): uint64_t -> size_t
This commit is contained in:
@ -10,20 +10,20 @@ namespace base64
|
||||
extern const char digits[65];
|
||||
extern const int8_t map[256];
|
||||
|
||||
bool isValid(const char *str, uint64_t str_size) noexcept;
|
||||
bool isValid(const char *str, size_t str_size) noexcept;
|
||||
bool isValid(std::string_view str) noexcept;
|
||||
|
||||
/**
|
||||
* @throw std::overflow_error if if there is an overflow
|
||||
*/
|
||||
uint64_t sizeEncoded(std::span<const uint8_t> data);
|
||||
uint64_t sizeDecoded(std::string_view str) noexcept;
|
||||
size_t sizeEncoded(std::span<const uint8_t> data);
|
||||
size_t sizeDecoded(std::string_view str) noexcept;
|
||||
|
||||
/**
|
||||
* @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);
|
||||
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;
|
||||
|
||||
/**
|
||||
@ -32,6 +32,6 @@ namespace base64
|
||||
* @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);
|
||||
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) noexcept;
|
||||
}
|
||||
Reference in New Issue
Block a user