BulldogTool.h 756 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // BulldogTool.h
  3. // UUTUtils
  4. //
  5. // Created by zhuge on 2018/1/23.
  6. // Copyright © 2018年 zhuge. All rights reserved.
  7. //
  8. #ifndef BulldogTool_h
  9. #define BulldogTool_h
  10. #include <string>
  11. using namespace std;
  12. class BulldogTool
  13. {
  14. public:
  15. static BulldogTool* getInstance();
  16. /*
  17. * 随机一个int数[start, end]
  18. */
  19. int randomInt(int start, int end);
  20. /*
  21. * 随机一个字符串
  22. */
  23. string randomString(int len);
  24. /*
  25. * 字符串加解密 (gzip)->(base64)->(1,2位置互换)->(插入干扰字符)
  26. */
  27. virtual string decrypt(string content);
  28. virtual string encrypt(string content);
  29. private:
  30. BulldogTool() = default;
  31. ~BulldogTool() = default;
  32. };
  33. #endif /* BulldogTool_h */