WPILibC++  unspecified
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_SUPPORT_BASE64_H_
9 #define WPIUTIL_SUPPORT_BASE64_H_
10 
11 #include <cstddef>
12 #include <string>
13 
14 #include "llvm/StringRef.h"
15 
16 namespace llvm {
17 template <typename T>
18 class SmallVectorImpl;
19 class raw_ostream;
20 } // namespace llvm
21 
22 namespace wpi {
23 
24 size_t Base64Decode(llvm::raw_ostream& os, llvm::StringRef encoded);
25 
26 size_t Base64Decode(llvm::StringRef encoded, std::string* plain);
27 
28 llvm::StringRef Base64Decode(llvm::StringRef encoded, size_t* num_read,
30 
31 void Base64Encode(llvm::raw_ostream& os, llvm::StringRef plain);
32 
33 void Base64Encode(llvm::StringRef plain, std::string* encoded);
34 
35 llvm::StringRef Base64Encode(llvm::StringRef plain,
37 
38 } // namespace wpi
39 
40 #endif // WPIUTIL_SUPPORT_BASE64_H_
Definition: Path.inc:31
Definition: SocketError.cpp:17
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:33
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:42