Counter Strike : Global Offensive Source Code
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.

36 lines
912 B

  1. #ifndef CRYPTOPP_BASE64_H
  2. #define CRYPTOPP_BASE64_H
  3. #include "basecode.h"
  4. NAMESPACE_BEGIN(CryptoPP)
  5. //! Base64 Encoder Class
  6. class Base64Encoder : public SimpleProxyFilter
  7. {
  8. public:
  9. Base64Encoder(BufferedTransformation *attachment = NULL, bool insertLineBreaks = true, int maxLineLength = 72)
  10. : SimpleProxyFilter(new BaseN_Encoder(new Grouper), attachment)
  11. {
  12. IsolatedInitialize(MakeParameters(Name::InsertLineBreaks(), insertLineBreaks)(Name::MaxLineLength(), maxLineLength));
  13. }
  14. void IsolatedInitialize(const NameValuePairs &parameters);
  15. };
  16. //! Base64 Decoder Class
  17. class Base64Decoder : public BaseN_Decoder
  18. {
  19. public:
  20. Base64Decoder(BufferedTransformation *attachment = NULL)
  21. : BaseN_Decoder(GetDecodingLookupArray(), 6, attachment) {}
  22. void IsolatedInitialize(const NameValuePairs &parameters) {}
  23. private:
  24. static const int * CRYPTOPP_API GetDecodingLookupArray();
  25. };
  26. NAMESPACE_END
  27. #endif