|
a/libupnpp/md5.hxx |
|
b/libupnpp/md5.hxx |
|
... |
|
... |
24 |
|
24 |
|
25 |
These notices must be retained in any copies of any part of this
|
25 |
These notices must be retained in any copies of any part of this
|
26 |
documentation and/or software.
|
26 |
documentation and/or software.
|
27 |
*/
|
27 |
*/
|
28 |
|
28 |
|
|
|
29 |
#include <string>
|
|
|
30 |
|
|
|
31 |
namespace UPnPP {
|
|
|
32 |
|
29 |
/* Base functions from original file */
|
33 |
/* Base functions from original file */
|
30 |
/* MD5 context. */
|
34 |
/* MD5 context. */
|
31 |
typedef struct MD5Context {
|
35 |
typedef struct MD5Context {
|
32 |
unsigned int state[4]; /* state (ABCD) */
|
36 |
unsigned int state[4]; /* state (ABCD) */
|
33 |
unsigned int count[2]; /* number of bits, modulo 2^64 (lsb first) */
|
37 |
unsigned int count[2]; /* number of bits, modulo 2^64 (lsb first) */
|
|
... |
|
... |
37 |
extern void MD5Init (MD5_CTX *);
|
41 |
extern void MD5Init (MD5_CTX *);
|
38 |
extern void MD5Update (MD5_CTX *, const unsigned char *, unsigned int);
|
42 |
extern void MD5Update (MD5_CTX *, const unsigned char *, unsigned int);
|
39 |
extern void MD5Final (unsigned char [16], MD5_CTX *);
|
43 |
extern void MD5Final (unsigned char [16], MD5_CTX *);
|
40 |
|
44 |
|
41 |
/* Convenience / utilities */
|
45 |
/* Convenience / utilities */
|
42 |
#include <string>
|
|
|
43 |
using std::string;
|
|
|
44 |
extern void MD5Final(string& digest, MD5_CTX *);
|
46 |
extern void MD5Final(std::string& digest, MD5_CTX *);
|
45 |
extern string& MD5String(const string& data, string& digest);
|
47 |
extern std::string& MD5String(const std::string& data, std::string& digest);
|
46 |
extern string& MD5HexPrint(const string& digest, string& xdigest);
|
48 |
extern std::string& MD5HexPrint(const std::string& digest,std::string& xdigest);
|
47 |
extern string& MD5HexScan(const string& xdigest, string& digest);
|
49 |
extern std::string& MD5HexScan(const std::string& xdigest, std::string& digest);
|
|
|
50 |
|
|
|
51 |
} // namespace
|
|
|
52 |
|
48 |
#endif /* _MD5_H_ */
|
53 |
#endif /* _MD5_H_ */
|