digestpp  0.01
Experimental C++11 header-only message digest library.
jh.hpp
1 /*
2 This code is written by kerukuro and released into public domain.
3 */
4 
5 #ifndef DIGESTPP_ALGORITHM_JG_HPP
6 #define DIGESTPP_ALGORITHM_JG_HPP
7 
8 #include "../hasher.hpp"
9 #include "detail/jh_provider.hpp"
10 
11 namespace digestpp
12 {
13 
14 /**
15  * @brief JH hash function
16  *
17  * @hash
18  *
19  * @outputsize 8 - 512 bits
20  *
21  * @defaultsize none
22  *
23  * @throw std::runtime_error if the requested digest size is not divisible by 8 (full bytes),
24  * or is not within the supported range
25  *
26  * @par Example:\n
27  * @code // Output a 256-bit JH digest of a string
28  * digestpp::jh hasher(256);
29  * hasher.absorb("The quick brown fox jumps over the lazy dog");
30  * std::cout << hasher.hexdigest() << '\n';
31  * @endcode
32  *
33  * @par Example output:\n
34  * @code 6a049fed5fc6874acfdc4a08b568a4f8cbac27de933496f031015b38961608a0
35  * @endcode
36  *
37  * @sa hasher
38  */
40 
41 } // namespace digestpp
42 
43 #endif // DIGESTPP_ALGORITHM_JG_HPP
hasher< detail::jh_provider > jh
JH hash function.
Definition: jh.hpp:39
hasher< detail::shake_provider< 256, 24 > > shake256
SHAKE256 function.
Definition: shake.hpp:53