8#ifndef BOTAN_FPE_FE1_H_
9#define BOTAN_FPE_FE1_H_
11#include <botan/bigint.h>
12#include <botan/sym_algo.h>
13#include <botan/symkey.h>
37 bool compat_mode =
false,
38 std::string_view mac_algo =
"HMAC(SHA-256)");
46 std::string
name()
const override;
48 void clear()
override;
71 void key_schedule(std::span<const uint8_t> key)
override;
77 std::unique_ptr<MessageAuthenticationCode> m_mac;
78 std::vector<uint8_t> m_n_bytes;
#define BOTAN_PUBLIC_API(maj, min)
BigInt encrypt(const BigInt &x, const uint8_t tweak[], size_t tweak_len) const
std::string name() const override
FPE_FE1(const BigInt &n, size_t rounds=5, bool compat_mode=false, std::string_view mac_algo="HMAC(SHA-256)")
bool has_keying_material() const override
Key_Length_Specification key_spec() const override
BigInt decrypt(const BigInt &x, const uint8_t tweak[], size_t tweak_len) const
BigInt fe1_decrypt(const BigInt &n, const BigInt &X, const SymmetricKey &key, const std::vector< uint8_t > &tweak)
BigInt fe1_encrypt(const BigInt &n, const BigInt &X, const SymmetricKey &key, const std::vector< uint8_t > &tweak)
std::vector< T, secure_allocator< T > > secure_vector