Furrent
|
#include "hash.hpp"
#include <array>
#include <limits>
#include <stdexcept>
#include <string>
#include <vector>
#include "smallsha1/sha1.hpp"
#include "spdlog/spdlog.h"
Namespaces | |
fur | |
Common types used in all the project. | |
fur::hash | |
Functions | |
std::string | fur::hash::error_to_string (HashError error) |
Function to translate an HashError to a string. More... | |
std::string | fur::hash::hash_to_str (const hash_t &hash) |
std::string | fur::hash::hash_to_hex (const hash_t &hash) |
Returns an hex string for the provided hash. More... | |
hash_t | fur::hash::compute_info_hash (const std::string &bencoded_info_dict) |
Computes the info hash given a bencoded string for the .torrent info dict. More... | |
util::Result< std::vector< hash_t >, HashError > | fur::hash::split_piece_hashes (const std::string &piece_hashes_str) |
bool | fur::hash::verify_piece (const std::vector< uint8_t > &piece, hash_t hash) |
Checks that a downloaded piece matches the provided hash. More... | |