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