Botan 3.5.0
Crypto and TLS for C&
|
#include <botan/ffi.h>
#include <botan/block_cipher.h>
#include <botan/internal/ffi_util.h>
Go to the source code of this file.
Functions | |
int | botan_block_cipher_block_size (botan_block_cipher_t bc) |
int | botan_block_cipher_clear (botan_block_cipher_t bc) |
int | botan_block_cipher_decrypt_blocks (botan_block_cipher_t bc, const uint8_t in[], uint8_t out[], size_t blocks) |
int | botan_block_cipher_destroy (botan_block_cipher_t bc) |
int | botan_block_cipher_encrypt_blocks (botan_block_cipher_t bc, const uint8_t in[], uint8_t out[], size_t blocks) |
int | botan_block_cipher_get_keyspec (botan_block_cipher_t cipher, size_t *out_minimum_keylength, size_t *out_maximum_keylength, size_t *out_keylength_modulo) |
int | botan_block_cipher_init (botan_block_cipher_t *bc, const char *bc_name) |
int | botan_block_cipher_name (botan_block_cipher_t cipher, char *name, size_t *name_len) |
int | botan_block_cipher_set_key (botan_block_cipher_t bc, const uint8_t key[], size_t len) |
BOTAN_FFI_DECLARE_STRUCT (botan_block_cipher_struct, Botan::BlockCipher, 0x64C29716) | |
int botan_block_cipher_block_size | ( | botan_block_cipher_t | bc | ) |
Return the positive block size of this block cipher, or negative to indicate an error
Definition at line 61 of file ffi_block.cpp.
References BOTAN_FFI_VISIT.
int botan_block_cipher_clear | ( | botan_block_cipher_t | bc | ) |
Reinitializes the block cipher
Definition at line 43 of file ffi_block.cpp.
References BOTAN_FFI_VISIT.
int botan_block_cipher_decrypt_blocks | ( | botan_block_cipher_t | bc, |
const uint8_t | in[], | ||
uint8_t | out[], | ||
size_t | blocks ) |
Decrypt one or more blocks with the cipher
Definition at line 72 of file ffi_block.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, and BOTAN_FFI_VISIT.
int botan_block_cipher_destroy | ( | botan_block_cipher_t | bc | ) |
Destroy a block cipher object
Definition at line 39 of file ffi_block.cpp.
References BOTAN_FFI_CHECKED_DELETE.
int botan_block_cipher_encrypt_blocks | ( | botan_block_cipher_t | bc, |
const uint8_t | in[], | ||
uint8_t | out[], | ||
size_t | blocks ) |
Encrypt one or more blocks with the cipher
Definition at line 65 of file ffi_block.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, and BOTAN_FFI_VISIT.
int botan_block_cipher_get_keyspec | ( | botan_block_cipher_t | cipher, |
size_t * | out_minimum_keylength, | ||
size_t * | out_maximum_keylength, | ||
size_t * | out_keylength_modulo ) |
Get the key length limits of this block cipher
cipher | the object to read |
out_minimum_keylength | if non-NULL, will be set to minimum keylength of cipher |
out_maximum_keylength | if non-NULL, will be set to maximum keylength of cipher |
out_keylength_modulo | if non-NULL will be set to byte multiple of valid keys |
Definition at line 87 of file ffi_block.cpp.
References BOTAN_FFI_VISIT.
int botan_block_cipher_init | ( | botan_block_cipher_t * | bc, |
const char * | cipher_name ) |
Initialize a block cipher object
Definition at line 18 of file ffi_block.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, Botan::BlockCipher::create(), and Botan_FFI::ffi_guard_thunk().
int botan_block_cipher_name | ( | botan_block_cipher_t | cipher, |
char * | name, | ||
size_t * | name_len ) |
Get the name of this block cipher
cipher | 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 79 of file ffi_block.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_VISIT, name, and Botan_FFI::write_str_output().
int botan_block_cipher_set_key | ( | botan_block_cipher_t | bc, |
const uint8_t | key[], | ||
size_t | len ) |
Set the key for a block cipher instance
Definition at line 50 of file ffi_block.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, and BOTAN_FFI_VISIT.
BOTAN_FFI_DECLARE_STRUCT | ( | botan_block_cipher_struct | , |
Botan::BlockCipher | , | ||
0x64C29716 | ) |