md5wrapper.h
Go to the documentation of this file.
00001 /*
00002  *      This is my wrapper-class to create
00003  *      a MD5 Hash from a string and a file.
00004  *
00005  *      This code is completly free, you 
00006  *      can copy it, modify it, or do 
00007  *      what ever you want with it.
00008  *
00009  *      Feb. 2005
00010  *      Benjamin Gr¨ądelbach
00011  */
00012 
00013 //include protection
00014 #ifndef MD5WRAPPER_H
00015 #define MD5WRAPPER_H
00016 
00017 //basic includes
00018 #include <string>
00019 
00020 
00021 
00022 #include "SparseVector.h"
00023 //forwards
00024 class MD5;
00025 
00026 class md5wrapper
00027 {
00028         private:
00029                 MD5 *md5;
00030         
00031                 /*
00032                  * internal hash function, calling
00033                  * the basic methods from md5.h
00034                  */     
00035                 std::string hashit(std::string text);
00036 
00037                 /*
00038                  * converts the numeric giets to
00039                  * a valid std::string
00040                  */
00041                 std::string convToString(unsigned char *bytes);
00042         public:
00043                 //constructor
00044                 md5wrapper();
00045 
00046                 //destructor
00047                 ~md5wrapper();
00048                 
00049                 /*
00050                  * creates a MD5 hash from
00051                  * "text" and returns it as
00052                  * string
00053                  */     
00054                 std::string getHashFromString(std::string text);
00055 
00056                 /*
00057                  * creates a MD5 hash from
00058                  * a file specified in "filename" and 
00059                  * returns it as string
00060                  */     
00061  
00062 };
00063 
00064 
00065 //include protection
00066 #endif
00067 
00068 /*
00069  * EOF
00070  */


appl
Author(s): petercai
autogenerated on Tue Jan 7 2014 11:02:29