|
6 | 6 | Hash++ is a C++17 header-only library that allows a user to retrieve multiple types of hashes from data, files, and files in nested directories. The original purpose behind this library was to create a header-file only implementation of multiple different hash algorithms. You can find a list of the <i>currently</i> supported hash algorithms below. |
7 | 7 | <br> |
8 | 8 | <h1><i>Supported Algorithms</i></h1> |
9 | | -<ul> |
10 | | - <li>MD5</li> |
11 | | - <li>MD4</li> |
12 | | - <li>MD2</li> |
13 | | - <li>SHA-1</li> |
14 | | - <li>SHA2-224</li> |
15 | | - <li>SHA2-256</li> |
16 | | - <li>SHA2-384</li> |
17 | | - <li>SHA2-512</li> |
18 | | - <li>SHA2-512/224</li> |
19 | | - <li>SHA2-512/256</li> |
20 | | -</ul> |
| 9 | + |
| 10 | +| Algorithm | HMAC Support? | |
| 11 | +| :-------------: | :-----------------: | |
| 12 | +| MD5 | :heavy_check_mark: | |
| 13 | +| MD4 | :heavy_check_mark: | |
| 14 | +| MD2 | :heavy_check_mark: | |
| 15 | +| SHA1 | :heavy_check_mark: | |
| 16 | +| SHA2-224 | :heavy_check_mark: | |
| 17 | +| SHA2-256 | :heavy_check_mark: | |
| 18 | +| SHA2-384 | :heavy_check_mark: | |
| 19 | +| SHA2-512 | :heavy_check_mark: | |
| 20 | +| SHA2-512/224 | :heavy_check_mark: | |
| 21 | +| SHA2-512/256 | :heavy_check_mark: | |
21 | 22 |
|
22 | 23 | Hash++ also aims to be a suitable alternative to heavier, statically and dynamically-linked libraries such as OpenSSL and Crypto++. I created it keeping in mind the mindset of a programmer who simply wants a header-only file that lets them easily and comfortably <i>"just hash sh*t."</i> Does it really have to be that difficult? |
23 | 24 |
|
@@ -93,40 +94,4 @@ No, it doesn't. |
93 | 94 | ``` |
94 | 95 |
|
95 | 96 | <h1><i>Using Hash++</i></h1> |
96 | | -My original design idea behind Hash++ was for it to be <b>simple</b>. This has remained unchanged. |
97 | | -<br><br> |
98 | | -Below you can find the signatures of the <i>only</i> functions necessary to accomplish retrieving hashes from both single or multiple sets of data, files, and files in nested directories. All functions are located in the <code>hashpp</code> namespace under class <code>get</code> (<code>hashpp::get</code>). |
99 | | -<br><br> |
100 | | -You can find examples of Hash++ in use in the <a href="/examples">/examples</a> and <a href="/tests">/tests</a> directories. |
101 | | -<br> |
102 | | -<h3><code>getHash</code></h3> |
103 | | -Retrieve a single hash from a single piece of data. |
104 | | - |
105 | | -```cpp |
106 | | -// function to return a resulting hash from selected ALGORITHM and passed data |
107 | | -static hashpp::hash getHash(hashpp::ALGORITHMS algorithm, const std::string& data) |
108 | | -``` |
109 | | -
|
110 | | -<h3><code>getHashes</code></h3> |
111 | | -Retrieve a collection of hashes from multiple pieces of data. |
112 | | -
|
113 | | -```cpp |
114 | | -// function to return a collection of resulting hashes from selected ALGORITHMS and passed data |
115 | | -static hashpp::hashCollection getHashes(const std::vector<std::pair<hashpp::ALGORITHMS, std::vector<std::string>>>& algorithmDataPairs) |
116 | | -``` |
117 | | - |
118 | | -<h3><code>getFileHash</code></h3> |
119 | | -Retrieve a single hash from a single file. |
120 | | - |
121 | | -```cpp |
122 | | -// function to return a resulting hash from selected ALGORITHM and passed file |
123 | | -static hashpp::hash getFileHash(hashpp::ALGORITHMS algorithm, const std::string& path) |
124 | | -``` |
125 | | -
|
126 | | -<h3><code>getFilesHashes</code></h3> |
127 | | -Retrieve a collection of hashes from multiple files or files in nested directories. |
128 | | -
|
129 | | -```cpp |
130 | | -// function to return a collection of resulting hashes from selected ALGORITHMS and passed files (with recursive directory support) |
131 | | -static hashpp::hashCollection getFilesHashes(const std::vector<std::pair<hashpp::ALGORITHMS, std::vector<std::string>>>& algorithmPathPairs) |
132 | | -``` |
| 97 | +You can find detailed documentation in the <a href="/documentation">/documentation</a> directory. |
0 commit comments