File: md5.hpp

package info (click to toggle)
salmon 1.10.2%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 35,580 kB
  • sloc: cpp: 199,285; ansic: 171,082; sh: 859; python: 792; makefile: 235
file content (43 lines) | stat: -rw-r--r-- 821 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
This code is written by kerukuro and released into public domain.
*/

#ifndef DIGESTPP_ALGORITHM_MD5_HPP
#define DIGESTPP_ALGORITHM_MD5_HPP

#include "../hasher.hpp"
#include "detail/md5_provider.hpp"

namespace digestpp
{

/**
 * @brief MD5 hash function
 *
 * Note that MD5 hash function is considered insecure and is not recommended for new applications.
 *
 * @hash
 *
 * @outputsize 128 bits
 *
 * @defaultsize 128 bits
 *
 * @par Example:\n
 * @code // Output an MD5 digest of a string
 * digestpp::md5 hasher;
 * hasher.absorb("The quick brown fox jumps over the lazy dog");
 * std::cout << hasher.hexdigest() << '\n';
 * @endcode
 *
 * @par Example output:\n
 * @code 9e107d9d372bb6826bd81d3542a419d6
 * @endcode
 *
 * @sa hasher
 */
typedef hasher<detail::md5_provider> md5;

} // namespace digestpp

#endif