libDwm-0.9.45
Dwm::Base64Url Class Reference

RFC 4648 base64 enconding and decoding functions for URLs. More...

#include <DwmBase64.hh>

Static Public Member Functions

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

Detailed Description

RFC 4648 base64 enconding and decoding functions for URLs.

Uses the alphabet from Table 2 of RFC 4648.

Member Function Documentation

◆ Decode()

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

Decodes the base64url 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::Base64Url::Encode ( std::istream & is,
std::ostream & os )
static

Base64url 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: