pwn++  0.1.4
A (toy) Windows & Linux pwn library to play with modern C++.
pwn::Utils::Base64 Class Reference

Static Public Member Functions

static auto Encode (const u8 *buffer, const usize buffer_length) -> Result< std::string >
 Encode a buffer of a given size to base64. More...
 
static auto Encode (std::vector< u8 > const &bytes) -> Result< std::string >
 Encode a vector of bytes to base64. More...
 
static auto Decode (std::string_view const &encoded_string) -> Result< std::vector< u8 >>
 Decode a base64 string. More...
 

Member Function Documentation

◆ Decode()

static auto pwn::Utils::Base64::Decode ( std::string_view const &  encoded_string) -> Result< std::vector< u8 >>
static

Decode a base64 string.

Parameters
encoded_string
Returns
Result<std::vector<u8>> a vector of bytes on success, Err() type otherwise

◆ Encode() [1/2]

static auto pwn::Utils::Base64::Encode ( const u8 *  buffer,
const usize  buffer_length 
) -> Result< std::string >
static

Encode a buffer of a given size to base64.

Parameters
bufferthe buffer to encode
buffer_lengththe buffer expected size
Returns
Result<std::string> a b64 string on success, Err() type otherwise

◆ Encode() [2/2]

static auto pwn::Utils::Base64::Encode ( std::vector< u8 > const &  bytes) -> Result< std::string >
static

Encode a vector of bytes to base64.

Parameters
bytesthe vector to encode
Returns
Result<std::string> a b64 string on success, Err() type otherwise

The documentation for this class was generated from the following file: