9#include <botan/internal/ffi_mp.h>
10#include <botan/internal/ffi_util.h>
13#if defined(BOTAN_HAS_FPE_FE1)
14 #include <botan/fpe_fe1.h>
21#if defined(BOTAN_HAS_FPE_FE1)
29#if defined(BOTAN_HAS_FPE_FE1)
31 if(fpe ==
nullptr || key ==
nullptr) {
45 fpe_obj->set_key(key, key_len);
47 *fpe =
new botan_fpe_struct(std::move(fpe_obj));
57#if defined(BOTAN_HAS_FPE_FE1)
66#if defined(BOTAN_HAS_FPE_FE1)
79#if defined(BOTAN_HAS_FPE_FE1)
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)