Skip to content

Commit

Permalink
Merge pull request #1891 from AntelopeIO/GH-1883-base64-rm-main
Browse files Browse the repository at this point in the history
[5.0 -> main] Revert "Fix base64 encoding"
  • Loading branch information
heifner authored Nov 13, 2023
2 parents 88e1759 + 72101c4 commit 680780d
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 440 deletions.
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

0 comments on commit 680780d

Please sign in to comment.