AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Binary codec utilities. More...
Namespaces | |
test | |
Test cases for CodecUtils. | |
Typedefs | |
typedef unsigned char | Byte |
Byte data type. More... | |
typedef std::vector< Byte > | Bytes |
Byte data block. More... | |
Functions | |
bool | encodeBase64 (const Bytes &binary, std::string &base64String) noexcept |
Encodes binary data into string using Base64. More... | |
bool | decodeBase64 (const std::string &base64String, Bytes &binary) noexcept |
Decodes binary data from string using Base64. More... | |
bool | encodeHex (const Bytes &binary, std::string &hexString) noexcept |
bool | decodeHex (const std::string &hexString, Bytes &binary) noexcept |
Decodes binary data from string using hex. More... | |
Binary codec utilities.
typedef unsigned char alexaClientSDK::codecUtils::Byte |
Byte data type.
typedef std::vector<Byte> alexaClientSDK::codecUtils::Bytes |
Byte data block.
|
noexcept |
Decodes binary data from string using Base64.
This method decodes binary data from string using Base64. Whitespace, newline, and carriage return characters are ignored.
The method converts 4 input characters (excluding ignorable whitespace) into 3 output bytes. If the method encounters unsupported character (other than A-Z,a-z,0-9,"+", "/", "=" at the end, or ignorable whitespace), the operation fails.
[in] | base64String | Data to decode in base64 form. |
[in,out] | binary | Decoded data. The method appends data to the container. |
|
noexcept |
Decodes binary data from string using hex.
Method decodes input from hexadecimal string. Whitespace, newline, and carriage return characters are ignored.
The method converts every 2 input characters (excluding ignorable whitespace) into single output byte. If the method encounters unsupported character (other than A-F,a-f,0-9, or ignorable whitespace), the operation fails.
[in] | hexString | Data to decode in hex form. |
[in,out] | binary | Container to store decoded data. The decoded contents is appended to container. |
|
noexcept |
Encodes binary data into string using Base64.
This method encodes binary data into printable form using Base64 encoding. The output uses characters A-Z,a-z,0-9, "+", "/". Every three bytes of data are converted into four bytes of output. If the input is not a multiple of 3 bytes, the output will be padded with "=" characters (one or two).
[in] | binary | Binary data to encode. |
[in,out] | base64String | Destination container. The method appends data to the container. |
|
noexcept |
Encode binary data into string using hex encoding.
Method encodes binary data into hexadecimal printable form. Every input byte is represented by two output bytes. The method uses number characters 0-9 and lowercase letters a-f to represent hexadecimal values.
Method appends data to destination container.
[in] | binary | Binary data to encode. |
[in,out] | hexString | Container to store encoded data. The data is appended to container. |
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0