digestpp
0.01
Experimental C++11 header-only message digest library.
algorithm
sha1.hpp
1
/*
2
This code is written by kerukuro and released into public domain.
3
*/
4
5
#
ifndef
DIGESTPP_ALGORITHM_SHA1_HPP
6
#
define
DIGESTPP_ALGORITHM_SHA1_HPP
7
8
#
include
"../hasher.hpp"
9
#
include
"detail/sha1_provider.hpp"
10
11
namespace
digestpp
12
{
13
14
/**
15
* @brief SHA-1 hash function
16
*
17
* Note that SHA-1 hash function is considered insecure and is not recommended for new applications.
18
*
19
* @hash
20
*
21
* @outputsize 160 bits
22
*
23
* @defaultsize 160 bits
24
*
25
* @par Example:\n
26
* @code // Output a SHA1 digest of a string
27
* digestpp::sha1 hasher;
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 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
34
* @endcode
35
*
36
* @sa hasher
37
*/
38
typedef
hasher
<
detail
::
sha1_provider
>
sha1
;
39
40
}
// namespace digestpp
41
42
#
endif
digestpp::shake256
hasher< detail::shake_provider< 256, 24 > > shake256
SHAKE256 function.
Definition:
shake.hpp:53
digestpp::sha1
hasher< detail::sha1_provider > sha1
SHA-1 hash function.
Definition:
sha1.hpp:38
Generated by
1.8.13