QsCodec.h 545 B

123456789101112131415161718192021
  1. #pragma once
  2. #include <string>
  3. #include <Kaguya/kaguya.hpp>
  4. #include "QsBuffer.h"
  5. class QsCodec
  6. {
  7. public:
  8. QsCodec();
  9. ~QsCodec();
  10. static void regist(kaguya::State& T);
  11. private:
  12. static std::string to_utf8(const std::string& value);
  13. static std::string to_gbk(const std::string& value);
  14. static QsBuffer base64_de(const std::string& value);
  15. static std::string base64_en(const QsBuffer& value);
  16. static QsBuffer aes_en(const QsBuffer& value,const std::string& key);
  17. static QsBuffer aes_de(const QsBuffer& value, const std::string& key);
  18. };