Botan 3.14.1
Crypto and TLS for C&
base64_avx512.h
Go to the documentation of this file.
1/*
2* (C) 2026 Jack Lloyd
3*
4* Botan is released under the Simplified BSD License (see license.txt)
5*/
6
7#ifndef BOTAN_BASE64_AVX512_H_
8#define BOTAN_BASE64_AVX512_H_
9
10#include <botan/types.h>
11
12namespace Botan {
13
14/**
15* Encode complete 48 byte groups of input, returning the number of
16* input bytes consumed (a multiple of 48)
17*/
18size_t base64_encode_avx512(char out[], const uint8_t in[], size_t length);
19
20/**
21* Copy in to out, removing any of the whitespace characters that base64
22* decoding ignores. Returns the number of bytes written.
23*/
24size_t base64_strip_ws_avx512(uint8_t out[], const uint8_t in[], size_t length);
25
26/**
27* Decode complete 64 character blocks, stopping early if any block
28* contains a character that is not one of the 64 data characters
29* (including padding and whitespace). Always leaves at least one block
30* for the caller so that padding handling and error reporting stay in
31* the scalar decoder. Returns the number of input characters consumed
32* (a multiple of 64); output written is consumed/4*3 bytes.
33*/
34size_t base64_decode_avx512(uint8_t out[], const uint8_t in[], size_t length);
35
36} // namespace Botan
37
38#endif
BOTAN_FN_ISA_AVX512 size_t base64_encode_avx512(char out[], const uint8_t in[], size_t length)
BOTAN_FN_ISA_AVX512_POPCNT size_t base64_strip_ws_avx512(uint8_t out[], const uint8_t in[], size_t length)
BOTAN_FN_ISA_AVX512_POPCNT size_t base64_decode_avx512(uint8_t out[], const uint8_t in[], size_t length)