AWS IoT Over-the-air Update v3.4.0
Client library for AWS IoT OTA
ota_base64_private.h
Go to the documentation of this file.
1/*
2 * AWS IoT Over-the-air Update v3.4.0
3 * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4 *
5 * SPDX-License-Identifier: MIT
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy of
8 * this software and associated documentation files (the "Software"), to deal in
9 * the Software without restriction, including without limitation the rights to
10 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11 * the Software, and to permit persons to whom the Software is furnished to do so,
12 * subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in all
15 * copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24
30#ifndef OTA_BASE64_PRIVATE_H
31#define OTA_BASE64_PRIVATE_H
32
33/* *INDENT-OFF* */
34#ifdef __cplusplus
35 extern "C" {
36#endif
37/* *INDENT-ON* */
38
39/* Standard includes. */
40#include <stdint.h>
41#include <stdlib.h>
42
47typedef enum Base64Status
48{
53
58
63
69
74
79
85
91
108Base64Status_t base64Decode( uint8_t * pDest,
109 const size_t destLen,
110 size_t * pResultLen,
111 const uint8_t * pEncodedData,
112 const size_t encodedLen );
113
114/* *INDENT-OFF* */
115#ifdef __cplusplus
116 }
117#endif
118/* *INDENT-ON* */
119
120#endif /* ifndef OTA_BASE64_PRIVATE_H */
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.
Definition: ota_base64.c:422
Base64Status_t
The Base64 functionality return status.
Definition: ota_base64_private.h:48
@ Base64InvalidSymbol
Invalid symbol in the encoded data.
Definition: ota_base64_private.h:57
@ Base64NullPointerInput
Input parameter for pointer is null.
Definition: ota_base64_private.h:73
@ Base64InvalidInputSize
Length of the encoded data is impossible to have been created with valid Base64 encoding.
Definition: ota_base64_private.h:68
@ Base64InvalidPaddingSymbol
Invalid number of padding symbols.
Definition: ota_base64_private.h:89
@ Base64Success
Base64 function success.
Definition: ota_base64_private.h:52
@ Base64InvalidSymbolOrdering
A Base64 symbol is in an invalid location within the encoded data.
Definition: ota_base64_private.h:62
@ Base64NonZeroPadding
Padding bits inside of the encoded data are invalid because they are not zero.
Definition: ota_base64_private.h:84
@ Base64InvalidBufferSize
Provided buffer is too small.
Definition: ota_base64_private.h:78