My Project
MD5.h
1 #pragma once
2 #include "coreexport.h"
3 #include <string>
4 
5 namespace ParaEngine
6 {
15  class MD5
16  {
17  public:
21  MD5();
22 
26  virtual ~MD5();
27 
33  void feed( const unsigned char* data, int bytes );
34  void feed( const char* data);
35 
40  void feed( const std::string& data );
41 
46  void finalize();
47 
52  const std::string hex(bool bLowercase=true);
53 
58  const std::string binary();
59 
63  void reset();
64 
65  private:
66  struct MD5State
67  {
68  unsigned int count[2]; /* message length in bits, lsw first */
69  unsigned int abcd[4]; /* digest buffer */
70  unsigned char buf[64]; /* accumulate block */
71  } m_state;
72 
73  void init();
74  void process( const unsigned char* data );
75 
76  static const unsigned char pad[64];
77 
78  bool m_finished;
79  };
80 }
const std::string binary()
Use this function to retrieve the raw binary hash.
Definition: MD5.cpp:399
different physics engine has different winding order.
Definition: EventBinding.h:32
void feed(const unsigned char *data, int bytes)
Use this function to feed the hash.
Definition: MD5.cpp:313
virtual ~MD5()
Virtual Destructor.
Definition: MD5.cpp:109
void reset()
Use this function to reset the hash.
Definition: MD5.cpp:411
const std::string hex(bool bLowercase=true)
Use this function to retrieve the hash value in hex.
Definition: MD5.cpp:378
MD5()
Constructs a new MD5 object.
Definition: MD5.cpp:103
void finalize()
This function is used to finalize the hash operation.
Definition: MD5.cpp:358
An MD% implementation.
Definition: MD5.h:15