8#include <botan/internal/ffi_util.h>
9#include <botan/internal/ffi_mp.h>
12#if defined(BOTAN_HAS_FPE_FE1)
13 #include <botan/fpe_fe1.h>
20#if defined(BOTAN_HAS_FPE_FE1)
27 const uint8_t key[],
size_t key_len,
28 size_t rounds, uint32_t flags)
30#if defined(BOTAN_HAS_FPE_FE1)
32 if(fpe ==
nullptr || key ==
nullptr)
42 std::unique_ptr<Botan::FPE_FE1> fpe_obj(
45 fpe_obj->set_key(key, key_len);
47 *fpe =
new botan_fpe_struct(std::move(fpe_obj));
58#if defined(BOTAN_HAS_FPE_FE1)
68#if defined(BOTAN_HAS_FPE_FE1)
82#if defined(BOTAN_HAS_FPE_FE1)
#define BOTAN_UNUSED(...)
struct botan_mp_struct * botan_mp_t
#define BOTAN_FPE_FLAG_FE1_COMPAT_MODE
@ BOTAN_FFI_ERROR_NOT_IMPLEMENTED
@ BOTAN_FFI_ERROR_BAD_FLAG
@ BOTAN_FFI_ERROR_NULL_POINTER
struct botan_fpe_struct * botan_fpe_t
int botan_fpe_decrypt(botan_fpe_t fpe, botan_mp_t x, const uint8_t tweak[], size_t tweak_len)
int botan_fpe_destroy(botan_fpe_t fpe)
int botan_fpe_encrypt(botan_fpe_t fpe, botan_mp_t x, const uint8_t tweak[], size_t tweak_len)
int botan_fpe_fe1_init(botan_fpe_t *fpe, botan_mp_t n, const uint8_t key[], size_t key_len, size_t rounds, uint32_t flags)
#define BOTAN_FFI_CHECKED_DELETE(o)
#define BOTAN_FFI_DECLARE_STRUCT(NAME, TYPE, MAGIC)
T & safe_get(botan_struct< T, M > *p)
int ffi_guard_thunk(const char *func_name, const std::function< int()> &thunk)