userver: userver/crypto/base64.hpp File Reference
Loading...
Searching...
No Matches
base64.hpp File Reference

Detailed Description

Cryptographic hashing, base64 encoding and decoding helpers.

Definition in file base64.hpp.

Go to the source code of this file.

#include <string>
#include <string_view>
+ This graph shows which files directly or indirectly include this file:

Namespaces

namespace  crypto
 Cryptographic primitives: hashing, signatures, certificates, and randomness.
 
namespace  crypto::base64
 Cryptographic hashing, base64 encoding and decoding helpers.
 

Enumerations

enum class  Pad {
  kWith ,
  kWithout
}
 

Functions

std::string crypto::base64::Base64Encode (std::string_view data, Pad pad=Pad::kWith)
 Encodes data to Base64, add padding by default.
 
std::string crypto::base64::Base64Decode (std::string_view data)
 Decodes data from Base64.
 
std::string crypto::base64::Base64UrlEncode (std::string_view data, Pad pad=Pad::kWith)
 Encodes data to Base64 (using URL alphabet), add padding by default.
 
std::string crypto::base64::Base64UrlDecode (std::string_view data)
 Decodes data from Base64 (using URL alphabet)
 
bool crypto::base64::Base64UniversalDecodeInPlace (std::string &data) noexcept
 Decodes data in-place and returns true on success.