// Copyright (c) FIRST and other WPILib contributors. // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. #ifndef WPIUTIL_WPI_BASE64_H_ #define WPIUTIL_WPI_BASE64_H_ #include #include #include #include #include #include namespace wpi { template class SmallVectorImpl; class raw_ostream; size_t Base64Decode(raw_ostream& os, std::string_view encoded); size_t Base64Decode(std::string_view encoded, std::string* plain); std::string_view Base64Decode(std::string_view encoded, size_t* num_read, SmallVectorImpl& buf); size_t Base64Decode(std::string_view encoded, std::vector* plain); std::span Base64Decode(std::string_view encoded, size_t* num_read, SmallVectorImpl& buf); void Base64Encode(raw_ostream& os, std::string_view plain); void Base64Encode(std::string_view plain, std::string* encoded); std::string_view Base64Encode(std::string_view plain, SmallVectorImpl& buf); void Base64Encode(raw_ostream& os, std::span plain); void Base64Encode(std::span plain, std::string* encoded); std::string_view Base64Encode(std::span plain, SmallVectorImpl& buf); } // namespace wpi #endif // WPIUTIL_WPI_BASE64_H_