resolve cyclic dependency with zstd
[platform/upstream/cmake.git] / Source / cmBase32.h
1 /* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2    file Copyright.txt or https://cmake.org/licensing for details.  */
3 #pragma once
4
5 #include "cmConfigure.h" // IWYU pragma: keep
6
7 #include <cstddef>
8 #include <string>
9
10 /** \class cmBase32Encoder
11  * \brief Encodes a byte sequence to a Base32 byte sequence according to
12  * RFC4648
13  *
14  */
15 class cmBase32Encoder
16 {
17 public:
18   static const char paddingChar = '=';
19
20   cmBase32Encoder();
21   ~cmBase32Encoder() = default;
22
23   // Encodes the given input byte sequence into a string
24   // @arg input Input data pointer
25   // @arg len Input data size
26   // @arg padding Flag to append "=" on demand
27   std::string encodeString(const unsigned char* input, size_t len,
28                            bool padding = true);
29 };