Mistake on this page?
Report an issue in GitHub or email us
base64b.h
1 /*
2 * Copyright (c) 2018 ARM Limited. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 * Licensed under the Apache License, Version 2.0 (the License); you may
5 * not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 
17 #include <stdint.h>
18 #include <stdlib.h>
19 #include <string>
20 
21 typedef enum {
22  BASE64_SUCCESS = 0,
23  BASE64_INVALID_PARAMETER = 1,
24  BASE64_BUFFER_TOO_SMALL = 2,
25  BASE64_ERROR = 3,
26 } base64_result_e;
27 
28 base64_result_e trng_EncodeBase64(const void *buffer, uint32_t bufferSize, char *string, uint32_t stringSize);
29 base64_result_e trng_DecodeNBase64(const char *string, uint32_t stringMaxSize, void *buffer, uint32_t bufferSize,
30  uint32_t *lengthWritten, uint32_t *charsProcessed);
31 
32 
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.