Atoms Crowd  7.0.0
Base64.h
1 #pragma once
2 // ===========================================================================
3 // Copyright (c) 2015 Toolchefs Ltd. All rights reserved.
4 //
5 // Use of this software is subject to the terms of the Toolchefs license
6 // agreement provided at the time of installation or download, or which
7 // otherwise accompanies this software in either electronic or hard copy form.
8 // ===========================================================================
9 #include <string>
10 #include <AtomsUtils/Globals.h>
11 
12 namespace AtomsUtils
13 {
15  class ATOMSUTILS_EXPORT Base64
16  {
17  public:
18  Base64();
19 
20  void encode(const unsigned char* in, size_t l, std::string& out);
21 
22  void decode(const std::string& in, unsigned char *out, size_t& sz);
23 
24  size_t decodeLength(const std::string& in);
25 
26  private:
27 
28  Base64(const Base64&) {}
29 
30  Base64& operator=(const Base64&) { return *this; }
31 
32  static const char *bstr;
33 
34  static const char rstr[128];
35  };
36 }
Base64 encode/decode.
Definition: Base64.h:16
AtomsCore namespace.
Definition: Base64.h:13