geode/loader/hash/hash.hpp
HJfod cdaa8ad6dc add all UI-related stuff from API, including index, nodes, actual ui,
resources, md4c; and fix up some minor formatting issues
2022-08-01 18:18:03 +03:00

14 lines
374 B
C++

#pragma once
#include <string>
#include <fstream>
#include <ciso646>
#include "picosha3.h"
#include <vector>
static std::string calculateHash(std::string const& path) {
std::vector<uint8_t> s(picosha3::bits_to_bytes(256));
auto sha3_256 = picosha3::get_sha3_generator<256>();
std::ifstream file(path);
return sha3_256.get_hex_string(file);
}