Mbed TLS v3.6.0
Loading...
Searching...
No Matches
base64.h
Go to the documentation of this file.
1
6/*
7 * Copyright The Mbed TLS Contributors
8 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
9 */
10#ifndef MBEDTLS_BASE64_H
11#define MBEDTLS_BASE64_H
12
13#include "mbedtls/build_info.h"
14
15#include <stddef.h>
16
18#define MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL -0x002A
20#define MBEDTLS_ERR_BASE64_INVALID_CHARACTER -0x002C
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
45int mbedtls_base64_encode(unsigned char *dst, size_t dlen, size_t *olen,
46 const unsigned char *src, size_t slen);
47
65int mbedtls_base64_decode(unsigned char *dst, size_t dlen, size_t *olen,
66 const unsigned char *src, size_t slen);
67
68#if defined(MBEDTLS_SELF_TEST)
74int mbedtls_base64_self_test(int verbose);
75
76#endif /* MBEDTLS_SELF_TEST */
77
78#ifdef __cplusplus
79}
80#endif
81
82#endif /* base64.h */
int mbedtls_base64_decode(unsigned char *dst, size_t dlen, size_t *olen, const unsigned char *src, size_t slen)
Decode a base64-formatted buffer.
int mbedtls_base64_encode(unsigned char *dst, size_t dlen, size_t *olen, const unsigned char *src, size_t slen)
Encode a buffer into base64 format.
int mbedtls_base64_self_test(int verbose)
Checkup routine.
Build-time configuration info.