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