诸暨麻将添加redis
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

32 lines
1.4 KiB

  1. // ***********************************************************************
  2. // Filename : Base64.h
  3. // Author : LIZHENG
  4. // Created : 2014-09-16
  5. // Description : Base64 ������
  6. //
  7. // Copyright (c) lizhenghn@gmail.com. All rights reserved.
  8. // ***********************************************************************
  9. #ifndef ZL_BASE64_H
  10. #define ZL_BASE64_H
  11. #include <string>
  12. namespace zl{
  13. namespace util{
  14. // len == strlen(src), and strlen(dst) >= len * 4 / 3
  15. // ���ر��������ַ�������
  16. size_t base64Encode(const char *src, size_t len, char *dst);
  17. size_t base64Encode(const char *src, size_t len, std::string& dst);
  18. size_t base64Encode(const std::string& src, std::string& dst);
  19. std::string base64Encode(const char *src, size_t len);
  20. std::string base64Encode(const std::string& src);
  21. // len == strlen(src), and strlen(dst) >= len * 3 / 4
  22. // ���ؽ��������ַ�������
  23. size_t base64Decode(const char *src, size_t len, char *dst);
  24. size_t base64Decode(const char *src, size_t len, std::string& dst);
  25. size_t base64Decode(const std::string& src, std::string& dst);
  26. std::string base64Decode(const char *src, size_t len);
  27. std::string base64Decode(const std::string& src);
  28. }
  29. }
  30. #endif /* ZL_BASE64_H */