29 lines
1.1 KiB
C++
29 lines
1.1 KiB
C++
#pragma once
|
|
#include "Public.h"
|
|
|
|
namespace uns
|
|
{
|
|
class UOHASH_DLL_API UOHash
|
|
{
|
|
public:
|
|
UOHash() = delete;
|
|
UOHash(const UOHash& obj) = delete;
|
|
private:
|
|
static constexpr auto INVALID_HASHEX_ARGUMENT = "Invalid HashEx Argument";
|
|
static constexpr auto HASH_CALCULATION_ERROR = "Hash Calculation Error";
|
|
static constexpr auto INVALID_HASH_FUNCTION = "Invalid Hash Function";
|
|
static constexpr auto FILE_DOES_NOT_EXIST = "File Doesn't Exist";
|
|
static constexpr auto HASH_LIBRARY_ERROR = "Hash Library Error";
|
|
static constexpr auto HASH_FUNCTION_CODING = "Hash Function Developing";
|
|
private:
|
|
static bool FileExist(std::string file);
|
|
static int CalculateHashSize(HashID HashID);
|
|
static std::string RemoveWhiteChar(std::string str);
|
|
static int CalculateHashExSize(HashID HashID, int output_bits = 0);
|
|
static rhash_print_sum_flags PickOutputType(HashID HashID);
|
|
public:
|
|
static HashResult DecodeString(HashID HashID, std::string Source);
|
|
static HashResult HashString(HashID HashID, std::string Source, int ex_output_bits = 128);
|
|
static HashResult HashFile(HashID HashID, std::string File, int ex_output_bits = 128);
|
|
};
|
|
}; |