|
Botan 3.11.0
Crypto and TLS for C&
|
#include <botan/ffi.h>#include <botan/xof.h>#include <botan/internal/ffi_util.h>Go to the source code of this file.
Functions | |
| BOTAN_FFI_DECLARE_STRUCT (botan_xof_struct, Botan::XOF, 0x0f1303a0) | |
| int | botan_xof_accepts_input (botan_xof_t this_xof) |
| int | botan_xof_block_size (botan_xof_t this_xof, size_t *out) |
| int | botan_xof_clear (botan_xof_t this_xof) |
| int | botan_xof_copy_state (botan_xof_t *dest, const botan_xof_t this_xof) |
| int | botan_xof_destroy (botan_xof_t xof) |
| int | botan_xof_init (botan_xof_t *this_xof, const char *xof_name, uint32_t flags) |
| int | botan_xof_name (botan_xof_t this_xof, char *name, size_t *name_len) |
| int | botan_xof_output (botan_xof_t this_xof, uint8_t *out, size_t out_len) |
| int | botan_xof_update (botan_xof_t this_xof, const uint8_t *in, size_t in_len) |
| BOTAN_FFI_DECLARE_STRUCT | ( | botan_xof_struct | , |
| Botan::XOF | , | ||
| 0x0f1303a0 | ) |
| int botan_xof_accepts_input | ( | botan_xof_t | xof | ) |
Get the input/output state of this eXtendable Output Function Typically, XOFs don't accept input as soon as the first output bytes were requested.
| xof | the object to read |
Definition at line 58 of file ffi_xof.cpp.
References BOTAN_FFI_VISIT.
| int botan_xof_block_size | ( | botan_xof_t | xof, |
| size_t * | block_size ) |
Writes the block size of the eXtendable Output Function to *block_size
| xof | XOF object |
| block_size | variable to hold the XOF's block size |
Definition at line 43 of file ffi_xof.cpp.
References Botan::any_null_pointers(), BOTAN_FFI_ERROR_NULL_POINTER, and BOTAN_FFI_VISIT.
| int botan_xof_clear | ( | botan_xof_t | xof | ) |
Reinitializes the state of the eXtendable Output Function.
| xof | XOF object |
Definition at line 62 of file ffi_xof.cpp.
References BOTAN_FFI_VISIT.
| int botan_xof_copy_state | ( | botan_xof_t * | dest, |
| botan_xof_t | source ) |
Copy the state of an eXtendable Output Function
| dest | destination XOF object |
| source | source XOF object |
Definition at line 39 of file ffi_xof.cpp.
References BOTAN_FFI_VISIT, and Botan_FFI::ffi_new_object().
| int botan_xof_destroy | ( | botan_xof_t | xof | ) |
Frees all resources of the eXtendable Output Function object
| xof | xof object |
Definition at line 90 of file ffi_xof.cpp.
References BOTAN_FFI_CHECKED_DELETE.
| int botan_xof_init | ( | botan_xof_t * | xof, |
| const char * | xof_name, | ||
| uint32_t | flags ) |
Initialize an eXtendable Output Function
| xof | XOF object |
| xof_name | name of the XOF, e.g., "SHAKE-128" |
| flags | should be 0 in current API revision, all other uses are reserved and return BOTAN_FFI_ERROR_BAD_FLAG |
Definition at line 19 of file ffi_xof.cpp.
References Botan::any_null_pointers(), BOTAN_FFI_ERROR_BAD_FLAG, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, Botan::XOF::create(), Botan_FFI::ffi_guard_thunk(), and Botan_FFI::ffi_new_object().
| int botan_xof_name | ( | botan_xof_t | xof, |
| char * | name, | ||
| size_t * | name_len ) |
Get the name of this eXtendable Output Function
| xof | the object to read |
| name | output buffer |
| name_len | on input, the length of buffer, on success the number of bytes written |
Definition at line 50 of file ffi_xof.cpp.
References Botan::any_null_pointers(), BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_VISIT, and Botan_FFI::write_str_output().
| int botan_xof_output | ( | botan_xof_t | xof, |
| uint8_t * | out, | ||
| size_t | out_len ) |
Generate output bytes from the eXtendable Output Function
| xof | XOF object |
| out | output buffer |
| out_len | number of bytes to write into the output buffer |
Definition at line 78 of file ffi_xof.cpp.
References Botan::any_null_pointers(), BOTAN_FFI_ERROR_NULL_POINTER, and BOTAN_FFI_VISIT.
| int botan_xof_update | ( | botan_xof_t | xof, |
| const uint8_t * | in, | ||
| size_t | in_len ) |
Send more input to the eXtendable Output Function
| xof | XOF object |
| in | input buffer |
| in_len | number of bytes to read from the input buffer |
Definition at line 66 of file ffi_xof.cpp.
References Botan::any_null_pointers(), BOTAN_FFI_ERROR_NULL_POINTER, and BOTAN_FFI_VISIT.