AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Static Public Member Functions | List of all members
alexaClientSDK::acsdkAssets::common::Base64Url Class Reference

#include <Base64Url.h>

Static Public Member Functions

static bool encode (const std::string &plain, std::string &encoded)
static bool decode (const std::string &encoded, std::string &plain)

Detailed Description

This is added to wrap Base64 functionality because we have no clean way of using it across all cases. We need to use Base64 on device and we'll use libssl (BoringSSL) for that, but the code in OpenSSL and BoringSSL differs for Base64! :( So for unit tests, and for running on Mac/Ubuntu, we'll use code copied over from mbedtls.

Member Function Documentation

◆ decode()

static bool alexaClientSDK::acsdkAssets::common::Base64Url::decode ( const std::string &  encoded,
std::string &  plain 

◆ encode()

static bool alexaClientSDK::acsdkAssets::common::Base64Url::encode ( const std::string &  plain,
std::string &  encoded 

Encodes plain text into URL-friendly Base64 version.

plainIN The text to encode.
encodedOUT Base64 string but further modified so that '+', '/' and '=' are converted to '%2B', '%2F' and '%3D' respectively.
true if successful

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

AlexaClientSDK 3.0.0 - Copyright 2016-2022, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0