Doxygen
Toggle main menu visibility
Loading...
Searching...
No Matches
md5hash.h
Go to the documentation of this file.
1
/******************************************************************************
2
*
3
* Copyright (C) 1997-2026 by Dimitri van Heesch.
4
*
5
* Permission to use, copy, modify, and distribute this software and its
6
* documentation under the terms of the GNU General Public License is hereby
7
* granted. No representations are made about the suitability of this software
8
* for any purpose. It is provided "as is" without express or implied warranty.
9
* See the GNU General Public License for more details.
10
*
11
* Documents produced by Doxygen are derivative works derived from the
12
* input used in their production; they are not affected by this license.
13
*
14
*/
15
16
#ifndef MD5HASH_H
17
#define MD5HASH_H
18
19
#include <array>
20
#include <string_view>
21
#include <cstdint>
22
#include <md5.h>
23
24
#include "
dstring.h
"
25
26
inline
std::array<uint8_t,16>
md5hash
(
const
std::string_view &str)
27
{
28
std::array<uint8_t,16> result;
29
MD5Buffer(str.data(),str.length(),result.data());
30
return
result;
31
}
32
33
inline
DString
md5str
(
const
std::string_view &str)
34
{
35
char
sigStr[33];
36
MD5SigToString(
md5hash
(str).data(),sigStr);
37
return
sigStr;
38
}
39
40
#endif
// MD5HASH_H
41
DString
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition
dstring.h:89
dstring.h
md5str
DString md5str(const std::string_view &str)
Definition
md5hash.h:33
md5hash
std::array< uint8_t, 16 > md5hash(const std::string_view &str)
Definition
md5hash.h:26
src
md5hash.h
Generated by
1.19.0