Isis 3 Programmer Reference
md5wrapper.h
1
/*
2
* This is my wrapper-class to create
3
* a MD5 Hash from a string and a file.
4
*
5
* This code is completly free, you
6
* can copy it, modify it, or do
7
* what ever you want with it.
8
*
9
* Feb. 2005
10
* Benjamin Grüdelbach
11
*/
12
13
//include protection
14
#ifndef MD5WRAPPER_H
15
#define MD5WRAPPER_H
16
17
//basic includes
18
#include <QString>
19
20
//forwards
21
class
MD5
;
22
28
class
md5wrapper
{
29
private
:
30
MD5
*md5;
31
32
/*
33
* internal hash function, calling
34
* the basic methods from md5.h
35
*/
36
QString hashit(QString text);
37
38
/*
39
* converts the numeric giets to
40
* a valid QString
41
*/
42
QString convToString(
unsigned
char
*bytes);
43
public
:
44
//constructor
45
md5wrapper
();
46
47
//destructor
48
~
md5wrapper
();
49
50
/*
51
* creates a MD5 hash from
52
* "text" and returns it as
53
* string
54
*/
55
QString getHashFromString(QString text);
56
57
/*
58
* creates a MD5 hash from
59
* a file specified in "filename" and
60
* returns it as string
61
*/
62
QString getHashFromFile(QString filename);
63
};
64
65
66
//include protection
67
#endif
68
69
/*
70
* EOF
71
*/
md5wrapper
Definition:
md5wrapper.h:28
MD5
Definition:
md5.h:60
src
base
objs
Md5Wrapper
md5wrapper.h