blob: 5af339fadc46379c2f641cb08747700ce7e977e8 (
plain)
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
|
#ifndef _MULTIHASH_H_
#define _MULTIHASH_H_
#include <string>
#include "ed2k.h"
#include <openssl/md4.h>
#include <openssl/md5.h>
#include <openssl/sha.h>
class Multihash {
private:
bool finished;
int crc32_ctx;
std::string crc32_str;
Ed2k ed2k_ctx;
std::string ed2k_str;
MD5_CTX md5_ctx;
std::string md5_str;
SHA_CTX sha1_ctx;
std::string sha1_str;
public:
Multihash();
void update(std::string data);
std::string crc32();
std::string ed2k();
std::string md5();
std::string sha1();
};
#endif // _HASH_H_
|