"Fossies" - the Fresh Open Source Software Archive

Member "postal-0.76/cmd5.h" (10 Jan 2007, 515 Bytes) of package /linux/privat/postal-0.76.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "cmd5.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef CMD5_H
    2 #define CMD5_H
    3 
    4 extern "C"
    5 {
    6 #ifdef USE_OPENSSL
    7 #include <openssl/md5.h>
    8 #else
    9 #include "md5.h"
   10 #endif
   11 }
   12 
   13 using namespace std;
   14 #include <string>
   15 
   16 class Cmd5
   17 {
   18 public:
   19   Cmd5();
   20 
   21   void init();
   22 
   23   // get the sum as a 16byte buffer
   24   void getSum(char *buf);
   25   // get the sum into a string reference
   26   string getSum();
   27 
   28   // add some more data to the data that has been summed.
   29   void addData(const char *buf, size_t bytes);
   30   void addData(const string &buf);
   31 
   32 private:
   33   MD5_CTX m_context;
   34 };
   35 
   36 #endif
   37