-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmd5.hpp
27 lines (25 loc) · 1.64 KB
/
md5.hpp
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
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
// http://ru.wikipedia.org/wiki/MD5
// wrapper for MD5 from http://ftp.gnu.org/gnu/coreutils/coreutils-8.21.tar.xz
// Alexey Potehin <[email protected]>, http://www.gnuplanet.ru/doc/cv
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
#ifndef MD5_HPP_INCLUDE
#define MD5_HPP_INCLUDE
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
#include <stdint.h>
#include "md5.h"
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
class md5_t
{
public:
typedef uint8_t md5_item_t[MD5_DIGEST_SIZE];
md5_t();
void open(md5_item_t *pmd5_item);
void update(const void * const p, uint64_t size);
void close();
private:
struct md5_ctx ctx;
md5_item_t *pmd5_item;
};
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
#endif