Botan  2.6.0
Crypto and TLS for C++11
Classes | Namespaces | Macros | Functions
ffi_util.h File Reference
#include <cstdint>
#include <memory>
#include <stdexcept>
#include <botan/exceptn.h>
#include <botan/mem_ops.h>

Go to the source code of this file.

Classes

struct  Botan_FFI::botan_struct< T, MAGIC >
 
class  Botan_FFI::FFI_Error
 

Namespaces

 Botan_FFI
 

Macros

#define BOTAN_FFI_CHECKED_DELETE(o)   ffi_delete_object(o, BOTAN_CURRENT_FUNCTION)
 
#define BOTAN_FFI_DECLARE_STRUCT(NAME, TYPE, MAGIC)   struct NAME final : public Botan_FFI::botan_struct<TYPE, MAGIC> { explicit NAME(TYPE* x) : botan_struct(x) {} }
 
#define BOTAN_FFI_DO(T, obj, param, block)
 

Functions

template<typename T , uint32_t M, typename F >
int Botan_FFI::apply_fn (botan_struct< T, M > *o, const char *func_name, F func)
 
template<typename T , uint32_t M>
int Botan_FFI::ffi_delete_object (botan_struct< T, M > *obj, const char *func_name)
 
int Botan_FFI::ffi_error_exception_thrown (const char *func_name, const char *exn)
 
template<typename Thunk >
int Botan_FFI::ffi_guard_thunk (const char *func_name, Thunk thunk)
 
template<typename T , uint32_t M>
TBotan_FFI::safe_get (botan_struct< T, M > *p)
 
int Botan_FFI::write_output (uint8_t out[], size_t *out_len, const uint8_t buf[], size_t buf_len)
 
int Botan_FFI::write_str_output (uint8_t out[], size_t *out_len, const std::string &str)
 
int Botan_FFI::write_str_output (char out[], size_t *out_len, const std::string &str)
 
int Botan_FFI::write_str_output (char out[], size_t *out_len, const std::vector< uint8_t > &str_vec)
 
template<typename Alloc >
int Botan_FFI::write_vec_output (uint8_t out[], size_t *out_len, const std::vector< uint8_t, Alloc > &buf)
 

Macro Definition Documentation

◆ BOTAN_FFI_CHECKED_DELETE

#define BOTAN_FFI_CHECKED_DELETE (   o)    ffi_delete_object(o, BOTAN_CURRENT_FUNCTION)

◆ BOTAN_FFI_DECLARE_STRUCT

#define BOTAN_FFI_DECLARE_STRUCT (   NAME,
  TYPE,
  MAGIC 
)    struct NAME final : public Botan_FFI::botan_struct<TYPE, MAGIC> { explicit NAME(TYPE* x) : botan_struct(x) {} }

Definition at line 42 of file ffi_util.h.

◆ BOTAN_FFI_DO

#define BOTAN_FFI_DO (   T,
  obj,
  param,
  block 
)
Value:
[=](T& param) -> int { do { block } while(0); return BOTAN_FFI_SUCCESS; })
int apply_fn(botan_struct< T, M > *o, const char *func_name, F func)
Definition: ffi_util.h:87
#define BOTAN_CURRENT_FUNCTION
Definition: compiler.h:143
fe T
Definition: ge.cpp:37

Definition at line 98 of file ffi_util.h.

Referenced by botan_block_cipher_block_size(), botan_block_cipher_clear(), botan_block_cipher_decrypt_blocks(), botan_block_cipher_encrypt_blocks(), botan_block_cipher_set_key(), botan_cipher_clear(), botan_cipher_get_default_nonce_length(), botan_cipher_get_tag_length(), botan_cipher_get_update_granularity(), botan_cipher_query_keylen(), botan_cipher_set_associated_data(), botan_cipher_set_key(), botan_cipher_valid_nonce_length(), botan_hash_block_size(), botan_hash_clear(), botan_hash_copy_state(), botan_hash_final(), botan_hash_output_length(), botan_hash_update(), botan_mac_clear(), botan_mac_final(), botan_mac_output_length(), botan_mac_set_key(), botan_mac_update(), botan_mp_add(), botan_mp_clear(), botan_mp_clear_bit(), botan_mp_cmp(), botan_mp_div(), botan_mp_equal(), botan_mp_flip_sign(), botan_mp_from_bin(), botan_mp_gcd(), botan_mp_get_bit(), botan_mp_is_even(), botan_mp_is_negative(), botan_mp_is_odd(), botan_mp_is_positive(), botan_mp_is_prime(), botan_mp_is_zero(), botan_mp_lshift(), botan_mp_mod_inverse(), botan_mp_mod_mul(), botan_mp_mul(), botan_mp_num_bits(), botan_mp_num_bytes(), botan_mp_powmod(), botan_mp_rand_bits(), botan_mp_rand_range(), botan_mp_rshift(), botan_mp_set_bit(), botan_mp_set_from_int(), botan_mp_set_from_mp(), botan_mp_set_from_radix_str(), botan_mp_set_from_str(), botan_mp_sub(), botan_mp_swap(), botan_mp_to_bin(), botan_mp_to_hex(), botan_mp_to_str(), botan_mp_to_uint32(), botan_pk_op_decrypt(), botan_pk_op_encrypt(), botan_pk_op_key_agreement(), botan_pk_op_key_agreement_export_public(), botan_pk_op_sign_finish(), botan_pk_op_sign_update(), botan_pk_op_verify_finish(), botan_pk_op_verify_update(), botan_privkey_check_key(), botan_privkey_ed25519_get_privkey(), botan_privkey_export(), botan_privkey_export_encrypted_pbkdf_iter(), botan_privkey_export_encrypted_pbkdf_msec(), botan_privkey_get_field(), botan_pubkey_algo_name(), botan_pubkey_check_key(), botan_pubkey_ed25519_get_pubkey(), botan_pubkey_estimated_strength(), botan_pubkey_export(), botan_pubkey_fingerprint(), botan_pubkey_get_field(), botan_rng_get(), botan_rng_reseed(), botan_x509_cert_allowed_usage(), botan_x509_cert_get_authority_key_id(), botan_x509_cert_get_fingerprint(), botan_x509_cert_get_issuer_dn(), botan_x509_cert_get_public_key_bits(), botan_x509_cert_get_serial_number(), botan_x509_cert_get_subject_dn(), botan_x509_cert_get_subject_key_id(), botan_x509_cert_get_time_expires(), botan_x509_cert_get_time_starts(), botan_x509_cert_hostname_match(), and botan_x509_cert_to_string().