mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[wpiutil] Base64: Add unsigned span/vector variants (#3702)
This commit is contained in:
@@ -8,6 +8,9 @@
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include "wpi/span.h"
|
||||
|
||||
namespace wpi {
|
||||
template <typename T>
|
||||
@@ -21,6 +24,11 @@ size_t Base64Decode(std::string_view encoded, std::string* plain);
|
||||
std::string_view Base64Decode(std::string_view encoded, size_t* num_read,
|
||||
SmallVectorImpl<char>& buf);
|
||||
|
||||
size_t Base64Decode(std::string_view encoded, std::vector<uint8_t>* plain);
|
||||
|
||||
span<uint8_t> Base64Decode(std::string_view encoded, size_t* num_read,
|
||||
SmallVectorImpl<uint8_t>& buf);
|
||||
|
||||
void Base64Encode(raw_ostream& os, std::string_view plain);
|
||||
|
||||
void Base64Encode(std::string_view plain, std::string* encoded);
|
||||
@@ -28,6 +36,13 @@ void Base64Encode(std::string_view plain, std::string* encoded);
|
||||
std::string_view Base64Encode(std::string_view plain,
|
||||
SmallVectorImpl<char>& buf);
|
||||
|
||||
void Base64Encode(raw_ostream& os, span<const uint8_t> plain);
|
||||
|
||||
void Base64Encode(span<const uint8_t> plain, std::string* encoded);
|
||||
|
||||
std::string_view Base64Encode(span<const uint8_t> plain,
|
||||
SmallVectorImpl<char>& buf);
|
||||
|
||||
} // namespace wpi
|
||||
|
||||
#endif // WPIUTIL_WPI_BASE64_H_
|
||||
|
||||
Reference in New Issue
Block a user