11#include <botan/internal/ffi_util.h>
47 return BOTAN_FFI_VISIT(this_xof, [=](
const auto& xof) { *out = xof.block_size(); });
59 return BOTAN_FFI_VISIT(this_xof, [=](
const auto& xof) {
return xof.accepts_input() ? 1 : 0; });
75 return BOTAN_FFI_VISIT(this_xof, [=](
auto& xof) { xof.update({in, in_len}); });
87 return BOTAN_FFI_VISIT(this_xof, [=](
auto& xof) { xof.output({out, out_len}); });
static std::unique_ptr< XOF > create(std::string_view algo_spec, std::string_view provider="")
struct botan_xof_struct * botan_xof_t
@ BOTAN_FFI_ERROR_NOT_IMPLEMENTED
@ BOTAN_FFI_ERROR_BAD_FLAG
@ BOTAN_FFI_ERROR_NULL_POINTER
#define BOTAN_FFI_VISIT(obj, lambda)
#define BOTAN_FFI_CHECKED_DELETE(o)
#define BOTAN_FFI_DECLARE_STRUCT(NAME, TYPE, MAGIC)
int botan_xof_output(botan_xof_t this_xof, uint8_t *out, size_t out_len)
int botan_xof_name(botan_xof_t this_xof, char *name, size_t *name_len)
int botan_xof_copy_state(botan_xof_t *dest, const botan_xof_t this_xof)
int botan_xof_clear(botan_xof_t this_xof)
int botan_xof_init(botan_xof_t *this_xof, const char *xof_name, uint32_t flags)
int botan_xof_destroy(botan_xof_t xof)
int botan_xof_update(botan_xof_t this_xof, const uint8_t *in, size_t in_len)
int botan_xof_accepts_input(botan_xof_t this_xof)
int botan_xof_block_size(botan_xof_t this_xof, size_t *out)
BOTAN_FFI_ERROR ffi_new_object(T *obj, Args &&... args)
int ffi_guard_thunk(const char *func_name, T thunk)
int write_str_output(char out[], size_t *out_len, const std::string &str)
bool any_null_pointers(Ptrs... ptr)