WPILibC++
2025.0.0-alpha-1-14-g3b6f38d
Base64.h
Go to the documentation of this file.
1
// Copyright (c) FIRST and other WPILib contributors.
2
// Open Source Software; you can modify and/or share it under the terms of
3
// the WPILib BSD license file in the root directory of this project.
4
5
#ifndef WPIUTIL_WPI_BASE64_H_
6
#define WPIUTIL_WPI_BASE64_H_
7
8
#include <stdint.h>
9
10
#include <cstddef>
11
#include <span>
12
#include <string>
13
#include <string_view>
14
#include <vector>
15
16
namespace
wpi
{
17
template
<
typename
T>
18
class
SmallVectorImpl;
19
class
raw_ostream;
20
21
size_t
Base64Decode
(
raw_ostream
& os,
std::string_view
encoded);
22
23
size_t
Base64Decode
(
std::string_view
encoded, std::string* plain);
24
25
std::string_view
Base64Decode
(
std::string_view
encoded,
size_t
* num_read,
26
SmallVectorImpl<char>
& buf);
27
28
size_t
Base64Decode
(
std::string_view
encoded, std::vector<uint8_t>* plain);
29
30
std::span<uint8_t>
Base64Decode
(
std::string_view
encoded,
size_t
* num_read,
31
SmallVectorImpl<uint8_t>
& buf);
32
33
void
Base64Encode
(
raw_ostream
& os,
std::string_view
plain);
34
35
void
Base64Encode
(
std::string_view
plain, std::string* encoded);
36
37
std::string_view
Base64Encode
(
std::string_view
plain,
38
SmallVectorImpl<char>
& buf);
39
40
void
Base64Encode
(
raw_ostream
& os, std::span<const uint8_t> plain);
41
42
void
Base64Encode
(std::span<const uint8_t> plain, std::string* encoded);
43
44
std::string_view
Base64Encode
(std::span<const uint8_t> plain,
45
SmallVectorImpl<char>
& buf);
46
47
}
// namespace wpi
48
49
#endif
// WPIUTIL_WPI_BASE64_H_
wpi::SmallVectorImpl< char >
wpi::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition:
raw_ostream.h:43
wpi
Definition:
ntcore_cpp.h:26
wpi::Base64Encode
void Base64Encode(raw_ostream &os, std::string_view plain)
wpi::Base64Decode
size_t Base64Decode(raw_ostream &os, std::string_view encoded)
string_view
basic_string_view< char > string_view
Definition:
base.h:601
wpi
Base64.h
Generated on Wed Jul 3 2024 17:20:03 for WPILibC++ by
1.9.4