soc/intel/xeon_sp/spr: Drop microcode constraints
[coreboot2.git] / src / include / b64_decode.h
blob34e0e5ac85e5ee37b8eb952d3e66e3696ee1f972
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef __INCLUDE_B64_DECODE_H__
4 #define __INCLUDE_B64_DECODE_H__
6 #include <stddef.h>
7 #include <stdint.h>
9 /*
10 * A function to convert a buffer of base64 format data into its source.
12 * The user provides output buffer of the size guaranteed to fit the result.
14 * Returns the size of the decoded data or zero if invalid characters were
15 * encountered in the input buffer.
17 size_t b64_decode(const uint8_t *input_data,
18 size_t input_length,
19 uint8_t *output_data);
21 /* A macro to derive decoded size of a base64 encoded blob. */
22 #define B64_DECODED_SIZE(encoded_size) (((encoded_size) * 3)/4)
24 #endif