WPILibC++  2019.1.1-beta-2-28-g9903348
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Base64.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2015-2018 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #ifndef WPIUTIL_WPI_BASE64_H_
9 #define WPIUTIL_WPI_BASE64_H_
10 
11 #include <cstddef>
12 #include <string>
13 
14 #include "wpi/StringRef.h"
15 
16 namespace wpi {
17 template <typename T>
18 class SmallVectorImpl;
19 class raw_ostream;
20 
21 size_t Base64Decode(raw_ostream& os, StringRef encoded);
22 
23 size_t Base64Decode(StringRef encoded, std::string* plain);
24 
25 StringRef Base64Decode(StringRef encoded, size_t* num_read,
26  SmallVectorImpl<char>& buf);
27 
28 void Base64Encode(raw_ostream& os, StringRef plain);
29 
30 void Base64Encode(StringRef plain, std::string* encoded);
31 
32 StringRef Base64Encode(StringRef plain, SmallVectorImpl<char>& buf);
33 
34 } // namespace wpi
35 
36 #endif // WPIUTIL_WPI_BASE64_H_
WPILib C++ utilities (wpiutil) namespace.
Definition: SmallString.h:21