13#include <botan/types.h>
32 typedef std::function<void(
size_t,
const uint8_t[],
size_t)>
output_cb_t;
39 ZFEC(
size_t K,
size_t N);
45 std::string provider()
const;
52 void encode(
const uint8_t input[],
size_t size,
const output_cb_t& output_cb)
const;
59 void encode_shares(
const std::vector<const uint8_t*>& shares,
61 const output_cb_t& output_cb)
const;
68 void decode_shares(
const std::map<size_t, const uint8_t*>& shares,
70 const output_cb_t& output_cb)
const;
73 static void addmul(uint8_t z[],
const uint8_t x[], uint8_t y,
size_t size);
75#if defined(BOTAN_HAS_ZFEC_SSE2)
76 static size_t addmul_sse2(uint8_t z[],
const uint8_t x[], uint8_t y,
size_t size);
79#if defined(BOTAN_HAS_ZFEC_VPERM)
80 static size_t addmul_vperm(uint8_t z[],
const uint8_t x[], uint8_t y,
size_t size);
83 const size_t m_K, m_N;
84 std::vector<uint8_t> m_enc_matrix;
std::function< void(size_t, const uint8_t[], size_t)> output_cb_t
size_t recovery_threshold() const
size_t generated_shares() const
int(* final)(unsigned char *, CTX *)
#define BOTAN_PUBLIC_API(maj, min)