libDwm-0.9.45
Dwm::Base64 Class Reference

RFC 4648 base64 encoding and decoding functions. More...

#include <DwmBase64.hh>

Static Public Member Functions

static std::string Encode (const std::string &s)
 Returns a base64 encoded version of s.
 
static std::string Decode (const std::string &s)
 Returns a decoded string for the base64-encoded string s on success, an empty string on failure.
 
static std::ostream & Encode (std::istream &is, std::ostream &os)
 Base64 encodes the contents of istream is into the ostream @ c os.
 
static std::ostream & Decode (std::istream &is, std::ostream &os)
 Decodes the base64 encoded contents of istream is into the ostream os.
 

Detailed Description

RFC 4648 base64 encoding and decoding functions.

Uses the alphabet from Table 1 of RFC 4648.

Member Function Documentation

◆ Decode()

static std::ostream & Dwm::Base64::Decode ( std::istream & is,
std::ostream & os )
static

Decodes the base64 encoded contents of istream is into the ostream os.

Returns the ostream os. Note that the failbit will be set on both streams on failure. A typical cause of failure would be an invalid character in the input stream is.

◆ Encode()

static std::ostream & Dwm::Base64::Encode ( std::istream & is,
std::ostream & os )
static

Base64 encodes the contents of istream is into the ostream @ c os.

Returns the ostream os.


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