Base64.h 519 B

123456789101112131415161718192021
  1. #ifndef ___BASE64_H___
  2. #define ___BASE64_H___
  3. #include <string>
  4. #include <vector>
  5. using namespace std;
  6. class CBase64
  7. {
  8. public:
  9. CBase64();
  10. ~CBase64();
  11. bool static Encode(const unsigned char *pIn, unsigned long uInLen, string& strOut);
  12. bool static Encode(const unsigned char *pIn, unsigned long uInLen, unsigned char *pOut, unsigned long *uOutLen);
  13. bool static Decode(const string& strIn, vector<unsigned char> &strOut);
  14. bool static Decode(const string& strIn, string &strOut);
  15. };
  16. #endif // ___BASE64_H___