forgetIt
 All Classes Files Functions
HASHCrypt.hpp
Go to the documentation of this file.
1 
12 //----- std -----
13 #include <iostream>
14 #include <string>
15 #include <sstream>
16 
17 //----- crypto++ -----
18 #include <crypto++/md5.h> //For MD5
19 #include <crypto++/hex.h> //For Hex convertion
20 #include <crypto++/sha.h> //For SHA
21 
22 
23 
24 
34 class HASHCrypt{
35 
36  public:
40  HASHCrypt();
41 
45  ~HASHCrypt();
46 
56  void getMD5_128(std::string chain, byte* digest, int size);
57 
67  void getSHA_256(std::string chain, byte* digest, int size); //Retourne SHA_256
68 
69  private:
70 
81  void checkDigestSize(int sizeRequired, int size);
82 
93  std::string getInvalidDigestSizeError(int sizeRequired, int size);
94 
95 
96 
97 };