Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.0 -> main] Revert "Fix base64 encoding" #1891

Merged
merged 4 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions libraries/libfc/include/fc/crypto/base64.hpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#pragma once
#include <string>
#include <string_view>

namespace fc {
std::string base64_encode(unsigned char const* bytes_to_encode, unsigned int in_len);
inline std::string base64_encode(char const* bytes_to_encode, unsigned int in_len) { return base64_encode( (unsigned char const*)bytes_to_encode, in_len); }
std::string base64_encode( const std::string_view& enc );
std::string base64_decode( const std::string_view& encoded_string);
std::string base64_encode( const std::string& enc );
std::string base64_decode( const std::string& encoded_string);

std::string base64url_encode(unsigned char const* bytes_to_encode, unsigned int in_len);
inline std::string base64url_encode(char const* bytes_to_encode, unsigned int in_len) { return base64url_encode( (unsigned char const*)bytes_to_encode, in_len); }
std::string base64url_encode( const std::string_view& enc );
std::string base64url_decode( const std::string_view& encoded_string);
std::string base64url_encode( const std::string& enc );
std::string base64url_decode( const std::string& encoded_string);
} // namespace fc
Loading