You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
732 B
41 lines
732 B
4 years ago
|
#ifndef WFP_UTIL_BASE64_H
|
||
|
#define WFP_UTILBASE64_H
|
||
5 years ago
|
|
||
|
#ifndef __cplusplus
|
||
|
#include <inttypes.h>
|
||
|
#include <stddef.h>
|
||
|
#include <stdbool.h>
|
||
|
#else
|
||
|
#include <cinttypes>
|
||
|
#include <cstddef>
|
||
|
#endif
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
extern "C"
|
||
|
{
|
||
|
#endif
|
||
|
|
||
4 years ago
|
extern size_t wfp_impl_base64_encoded_size(size_t length);
|
||
5 years ago
|
|
||
4 years ago
|
extern size_t wfp_impl_base64_encode(
|
||
5 years ago
|
uint8_t const * data,
|
||
|
size_t length,
|
||
|
char * buffer,
|
||
|
size_t buffer_size);
|
||
|
|
||
4 years ago
|
extern size_t wfp_impl_base64_decoded_size(char const * data, size_t length);
|
||
5 years ago
|
|
||
4 years ago
|
extern size_t wfp_impl_base64_decode(
|
||
5 years ago
|
char const * data,
|
||
|
size_t length,
|
||
|
uint8_t * buffer,
|
||
|
size_t buffer_size);
|
||
|
|
||
4 years ago
|
extern bool wfp_impl_base64_isvalid(char const * data, size_t length);
|
||
5 years ago
|
|
||
|
#ifdef __cplusplus
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#endif
|