base64.h
上传用户:xqtpzdz
上传日期:2022-05-21
资源大小:1764k
文件大小:1k
源码类别:

xml/soap/webservice

开发平台:

Visual C++

  1. /*****************************************************************************
  2.  *****************************************************************************
  3.  *
  4.  *
  5.  * Base64 conversion.
  6.  *
  7.  * Written by Alex Fedotov, posted at CodeGuru
  8.  * (http://codeguru.earthweb.com) with no copyright or restrictions on
  9.  * its use.  
  10.  *
  11.  *****************************************************************************
  12.  ****************************************************************************/
  13. #ifndef __base64_h_included
  14. #define __base64_h_included
  15. #include <wchar.h>
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. #define B64ELEN(cb)  (((cb) + 2) / 3 * 4)
  20. #define B64DLEN(cch) ((cch) * 3 / 4 + ((cch) % 4))
  21. long b64elen(size_t cb);
  22. long b64dlen(size_t cch);
  23. long strb64d(const char * psz, size_t cch, void * p);
  24. long strb64e(const void * p, size_t cb, char * psz);
  25. int strisb64(const char * psz, size_t cch);
  26. long wcsb64d(const wchar_t * psz, size_t cch, void * p);
  27. long wcsb64e(const void * p, size_t cb, wchar_t * psz);
  28. int wcsisb64(const wchar_t * psz, size_t cch);
  29. #ifdef __cplusplus
  30. }
  31. #endif
  32. #endif // __base64_h_included