feat(hex): without overloading; fix(sha256): const uint8_t * -> uint8_t *
This commit is contained in:
@ -6,6 +6,6 @@
|
||||
#define SHA256_DIGEST_LENGTH 32
|
||||
|
||||
namespace hash {
|
||||
void sha256(const uint8_t *data, uint64_t data_size, const uint8_t *hash) noexcept;
|
||||
void sha256(const uint8_t *data, uint64_t data_size, uint8_t *hash) noexcept;
|
||||
std::vector<uint8_t> sha256(const std::vector<uint8_t> &data) noexcept;
|
||||
}
|
||||
12
include/base/hex.hpp
Normal file
12
include/base/hex.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace hex
|
||||
{
|
||||
bool isValid(const std::string &str) noexcept;
|
||||
std::string encode(const std::vector<uint8_t> &data) noexcept;
|
||||
std::vector<uint8_t> decode(const std::string &str);
|
||||
}
|
||||
Reference in New Issue
Block a user