11 #include <string_view> 16 std::string
toHex(std::vector<uint8_t>
const& digest);
18 std::vector<uint8_t>
sha256sum(
void const* data,
size_t len);
19 inline std::vector<uint8_t>
sha256sum(std::string_view data) {
20 return sha256sum(data.data(), data.size());
22 inline std::vector<uint8_t>
sha256sum(std::vector<uint8_t>
const& data) {
23 return sha256sum(data.data(), data.size());
26 std::vector<uint8_t>
md5sum(
void const* data,
size_t len);
27 inline std::vector<uint8_t>
md5sum(std::string_view data) {
28 return md5sum(data.data(), data.size());
30 inline std::vector<uint8_t>
md5sum(std::vector<uint8_t>
const& data) {
31 return md5sum(data.data(), data.size());
std::vector< uint8_t > md5sum(void const *data, size_t len)
Definition: checksum.cpp:35
std::vector< uint8_t > sha256sum(void const *data, size_t len)
Definition: checksum.cpp:26
General utilities.
Definition: assert.cpp:7
std::string toHex(std::vector< uint8_t > const &digest)
Definition: checksum.cpp:15