AWS IoT Over-the-air Update v3.2.0
Client library for AWS IoT OTA
ota_base64_private.h File Reference

Function declarations and error codes for ota_base64.c. More...

#include <stdint.h>
#include <stdlib.h>
Include dependency graph for ota_base64_private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  Base64Status_t {
  Base64Success , Base64InvalidSymbol , Base64InvalidSymbolOrdering , Base64InvalidInputSize ,
  Base64NullPointerInput , Base64InvalidBufferSize , Base64NonZeroPadding , Base64InvalidPaddingSymbol
}
 The Base64 functionality return status. More...
 

Functions

Base64Status_t base64Decode (uint8_t *pDest, const size_t destLen, size_t *pResultLen, const uint8_t *pEncodedData, const size_t encodedLen)
 Decode Base64 encoded data. More...
 

Detailed Description

Function declarations and error codes for ota_base64.c.

Enumeration Type Documentation

◆ Base64Status_t

The Base64 functionality return status.

ota_enum_types

Enumerator
Base64Success 

Base64 function success.

Base64InvalidSymbol 

Invalid symbol in the encoded data.

Base64InvalidSymbolOrdering 

A Base64 symbol is in an invalid location within the encoded data.

Base64InvalidInputSize 

Length of the encoded data is impossible to have been created with valid Base64 encoding.

Base64NullPointerInput 

Input parameter for pointer is null.

Base64InvalidBufferSize 

Provided buffer is too small.

Base64NonZeroPadding 

Padding bits inside of the encoded data are invalid because they are not zero.

Base64InvalidPaddingSymbol 

Invalid number of padding symbols.

Function Documentation

◆ base64Decode()

Base64Status_t base64Decode ( uint8_t *  pDest,
const size_t  destLen,
size_t *  pResultLen,
const uint8_t *  pEncodedData,
const size_t  encodedLen 
)

Decode Base64 encoded data.

Parameters
[out]pDestPointer to a buffer for storing the decoded result.
[in]destLenLength of the pDest buffer.
[out]pResultLenPointer to the length of the decoded result.
[in]pEncodedDataPointer to a buffer containing the Base64 encoded data that is intended to be decoded.
[in]encodedLenLength of the pEncodedData buffer.
Returns
One of the following:
  • Base64Success if the Base64 encoded data was valid and successfully decoded.
  • An error code defined in ota_base64_private.h if the encoded data or input parameters are invalid.