tox_ngc_ft1_tool/src/hash_utils.hpp

11 lines
290 B
C++
Raw Normal View History

2023-01-15 01:44:48 +01:00
#pragma once
#include <cstdint>
#include <vector>
// returns the 20bytes sha1 hash
std::vector<uint8_t> hash_sha1(const uint8_t* data, size_t size);
inline std::vector<uint8_t> hash_sha1(const char* data, size_t size) { return hash_sha1(reinterpret_cast<const uint8_t*>(data), size); }