|
Botan 3.9.0
Crypto and TLS for C&
|
#include <botan/ffi.h>#include <botan/internal/ffi_util.h>Go to the source code of this file.
Functions | |
| int | botan_zfec_decode (size_t K, size_t N, const size_t *indexes, uint8_t *const *const inputs, size_t shareSize, uint8_t **outputs) |
| int | botan_zfec_encode (size_t K, size_t N, const uint8_t *input, size_t size, uint8_t **outputs) |
| int botan_zfec_decode | ( | size_t | K, |
| size_t | N, | ||
| const size_t * | indexes, | ||
| uint8_t *const * | inputs, | ||
| size_t | shareSize, | ||
| uint8_t ** | outputs ) |
Decode some previously encoded shares using certain ZFEC parameters.
| K | the number of shares needed for recovery |
| N | the total number of shares |
| indexes | The index into the encoder's outputs for the corresponding element of the inputs array. Must be of length K. |
| inputs | K previously encoded shares to decode |
| shareSize | the length in bytes of each input |
| outputs | An out parameter pointing to a fully allocated array of size [K][shareSize]. For all k in range, a decoded block will written to the memory starting at outputs[k][0]. |
Definition at line 31 of file ffi_zfec.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_SUCCESS, BOTAN_UNUSED, Botan::ZFEC::decode_shares(), and Botan_FFI::ffi_guard_thunk().
Referenced by botan_srp6_server_session_step1().
| int botan_zfec_encode | ( | size_t | K, |
| size_t | N, | ||
| const uint8_t * | input, | ||
| size_t | size, | ||
| uint8_t ** | outputs ) |
ZFEC Encode some bytes with certain ZFEC parameters.
| K | the number of shares needed for recovery |
| N | the number of shares generated |
| input | the data to FEC |
| size | the length in bytes of input, which must be a multiple of K |
| outputs | An out parameter pointing to a fully allocated array of size [N][size / K]. For all n in range, an encoded block will be written to the memory starting at outputs[n][0]. |
Definition at line 17 of file ffi_zfec.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_SUCCESS, BOTAN_UNUSED, Botan::ZFEC::encode(), and Botan_FFI::ffi_guard_thunk().
Referenced by botan_srp6_server_session_step1().