Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
20
libs/coding/sha1.hpp
Normal file
20
libs/coding/sha1.hpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace coding
|
||||
{
|
||||
class SHA1
|
||||
{
|
||||
public:
|
||||
static size_t constexpr kHashSizeInBytes = 20;
|
||||
using Hash = std::array<uint8_t, kHashSizeInBytes>;
|
||||
|
||||
static Hash Calculate(std::string const & filePath);
|
||||
static std::string CalculateBase64(std::string const & filePath);
|
||||
|
||||
static Hash CalculateForString(std::string_view str);
|
||||
};
|
||||
} // namespace coding
|
||||
Loading…
Add table
Add a link
Reference in a new issue