userver: crypto::base64 Namespace Reference
Loading...
Searching...
No Matches
crypto::base64 Namespace Reference

Detailed Description

Cryptographic hashing.

Enumerations

enum class  Pad {
  kWith ,
  kWithout
}
 

Functions

std::string Base64Encode (std::string_view data, Pad pad=Pad::kWith)
 Encodes data to Base64, add padding by default.
 
std::string Base64Decode (std::string_view data)
 Decodes data from Base64.
 
std::string Base64UrlEncode (std::string_view data, Pad pad=Pad::kWith)
 Encodes data to Base64 (using URL alphabet), add padding by default.
 
std::string Base64UrlDecode (std::string_view data)
 Decodes data from Base64 (using URL alphabet)
 

Enumeration Type Documentation

◆ Pad

enum class crypto::base64::Pad
strong

Definition at line 14 of file base64.hpp.

Function Documentation

◆ Base64Decode()

std::string crypto::base64::Base64Decode ( std::string_view data)

Decodes data from Base64.

Exceptions
CryptoExceptioninternal library exception

◆ Base64Encode()

std::string crypto::base64::Base64Encode ( std::string_view data,
Pad pad = Pad::kWith )

Encodes data to Base64, add padding by default.

Parameters
padcontrols if pad should be added or not
Exceptions
CryptoExceptioninternal library exception

◆ Base64UrlDecode()

std::string crypto::base64::Base64UrlDecode ( std::string_view data)

Decodes data from Base64 (using URL alphabet)

Exceptions
CryptoExceptioninternal library exception

◆ Base64UrlEncode()

std::string crypto::base64::Base64UrlEncode ( std::string_view data,
Pad pad = Pad::kWith )

Encodes data to Base64 (using URL alphabet), add padding by default.

Parameters
padcontrols if pad should be added or not
Exceptions
CryptoExceptioninternal library exception