Mbed TLS v4.1.1
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
15
16#include <stddef.h>
17
19#define MBEDTLS_ERR_BASE64_INVALID_CHARACTER -0x002C
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
44int mbedtls_base64_encode(unsigned char *dst, size_t dlen, size_t *olen,
45 const unsigned char *src, size_t slen);
46
64int mbedtls_base64_decode(unsigned char *dst, size_t dlen, size_t *olen,
65 const unsigned char *src, size_t slen);
66
67#if defined(MBEDTLS_SELF_TEST)
73int mbedtls_base64_self_test(int verbose);
74
75#endif /* MBEDTLS_SELF_TEST */
76
77#ifdef __cplusplus
78}
79#endif
80
81#endif /* MBEDTLS_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.
Compatibility definitions for MbedTLS 3.x code built with MbedTLS 4.x or TF-PSA-Crypto 1....
Build-time configuration info.