Botan
2.1.0
Crypto and TLS for C++11
|
#include <botan/build.h>
#include <stdint.h>
#include <stddef.h>
Go to the source code of this file.
Macros | |
#define | BOTAN_CHECK_KEY_EXPENSIVE_TESTS 1 |
#define | BOTAN_CIPHER_INIT_FLAG_DECRYPT 1 |
#define | BOTAN_CIPHER_INIT_FLAG_ENCRYPT 0 |
#define | BOTAN_CIPHER_INIT_FLAG_MASK_DIRECTION 1 |
#define | BOTAN_CIPHER_UPDATE_FLAG_FINAL (1U << 0) |
#define | BOTAN_FFI_ERROR_BAD_FLAG (-30) |
#define | BOTAN_FFI_ERROR_EXCEPTION_THROWN (-20) |
#define | BOTAN_FFI_ERROR_INSUFFICIENT_BUFFER_SPACE (-10) |
#define | BOTAN_FFI_ERROR_NOT_IMPLEMENTED (-40) |
#define | BOTAN_FFI_ERROR_NULL_POINTER (-31) |
#define | BOTAN_FFI_HEX_LOWER_CASE 1 |
#define | BOTAN_PRIVKEY_EXPORT_FLAG_DER 0 |
#define | BOTAN_PRIVKEY_EXPORT_FLAG_PEM 1 |
Typedefs | |
typedef struct botan_block_cipher_struct * | botan_block_cipher_t |
typedef struct botan_cipher_struct * | botan_cipher_t |
typedef struct botan_hash_struct * | botan_hash_t |
typedef struct botan_mac_struct * | botan_mac_t |
typedef struct botan_mp_struct * | botan_mp_t |
typedef struct botan_pk_op_decrypt_struct * | botan_pk_op_decrypt_t |
typedef struct botan_pk_op_encrypt_struct * | botan_pk_op_encrypt_t |
typedef struct botan_pk_op_ka_struct * | botan_pk_op_ka_t |
typedef struct botan_pk_op_sign_struct * | botan_pk_op_sign_t |
typedef struct botan_pk_op_verify_struct * | botan_pk_op_verify_t |
typedef struct botan_privkey_struct * | botan_privkey_t |
typedef struct botan_pubkey_struct * | botan_pubkey_t |
typedef struct botan_rng_struct * | botan_rng_t |
typedef struct botan_x509_cert_struct * | botan_x509_cert_t |
Enumerations | |
enum | botan_x509_cert_key_constraints { NO_CONSTRAINTS = 0, DIGITAL_SIGNATURE = 32768, NON_REPUDIATION = 16384, KEY_ENCIPHERMENT = 8192, DATA_ENCIPHERMENT = 4096, KEY_AGREEMENT = 2048, KEY_CERT_SIGN = 1024, CRL_SIGN = 512, ENCIPHER_ONLY = 256, DECIPHER_ONLY = 128 } |
Functions | |
BOTAN_DLL int | botan_bcrypt_generate (uint8_t *out, size_t *out_len, const char *password, botan_rng_t rng, size_t work_factor, uint32_t flags) |
BOTAN_DLL int | botan_bcrypt_is_valid (const char *pass, const char *hash) |
BOTAN_DLL int | botan_block_cipher_block_size (botan_block_cipher_t bc) |
BOTAN_DLL int | botan_block_cipher_clear (botan_block_cipher_t bc) |
BOTAN_DLL int | botan_block_cipher_decrypt_blocks (botan_block_cipher_t bc, const uint8_t in[], uint8_t out[], size_t blocks) |
BOTAN_DLL int | botan_block_cipher_destroy (botan_block_cipher_t bc) |
BOTAN_DLL int | botan_block_cipher_encrypt_blocks (botan_block_cipher_t bc, const uint8_t in[], uint8_t out[], size_t blocks) |
BOTAN_DLL int | botan_block_cipher_init (botan_block_cipher_t *bc, const char *cipher_name) |
BOTAN_DLL int | botan_block_cipher_set_key (botan_block_cipher_t bc, const uint8_t key[], size_t len) |
BOTAN_DLL int | botan_cipher_clear (botan_cipher_t hash) |
BOTAN_DLL int | botan_cipher_destroy (botan_cipher_t cipher) |
BOTAN_DLL int | botan_cipher_get_default_nonce_length (botan_cipher_t cipher, size_t *nl) |
BOTAN_DLL int | botan_cipher_get_tag_length (botan_cipher_t cipher, size_t *tag_size) |
BOTAN_DLL int | botan_cipher_get_update_granularity (botan_cipher_t cipher, size_t *ug) |
BOTAN_DLL int | botan_cipher_init (botan_cipher_t *cipher, const char *name, uint32_t flags) |
BOTAN_DLL int | botan_cipher_query_keylen (botan_cipher_t, size_t *out_minimum_keylength, size_t *out_maximum_keylength) |
BOTAN_DLL int | botan_cipher_set_associated_data (botan_cipher_t cipher, const uint8_t *ad, size_t ad_len) |
BOTAN_DLL int | botan_cipher_set_key (botan_cipher_t cipher, const uint8_t *key, size_t key_len) |
BOTAN_DLL int | botan_cipher_start (botan_cipher_t cipher, const uint8_t *nonce, size_t nonce_len) |
BOTAN_DLL int | botan_cipher_update (botan_cipher_t cipher, uint32_t flags, uint8_t output[], size_t output_size, size_t *output_written, const uint8_t input_bytes[], size_t input_size, size_t *input_consumed) |
BOTAN_DLL int | botan_cipher_valid_nonce_length (botan_cipher_t cipher, size_t nl) |
BOTAN_DLL uint32_t | botan_ffi_api_version () |
BOTAN_DLL int | botan_ffi_supports_api (uint32_t api_version) |
BOTAN_DLL int | botan_hash_clear (botan_hash_t hash) |
BOTAN_DLL int | botan_hash_destroy (botan_hash_t hash) |
BOTAN_DLL int | botan_hash_final (botan_hash_t hash, uint8_t out[]) |
BOTAN_DLL int | botan_hash_init (botan_hash_t *hash, const char *hash_name, uint32_t flags) |
BOTAN_DLL int | botan_hash_name (botan_hash_t hash, char *name, size_t name_len) |
BOTAN_DLL int | botan_hash_output_length (botan_hash_t hash, size_t *output_length) |
BOTAN_DLL int | botan_hash_update (botan_hash_t hash, const uint8_t *in, size_t in_len) |
BOTAN_DLL int | botan_hex_encode (const uint8_t *x, size_t len, char *out, uint32_t flags) |
BOTAN_DLL int | botan_kdf (const char *kdf_algo, uint8_t out[], size_t out_len, const uint8_t secret[], size_t secret_len, const uint8_t salt[], size_t salt_len, const uint8_t label[], size_t label_len) |
BOTAN_DLL int | botan_mac_clear (botan_mac_t mac) |
BOTAN_DLL int | botan_mac_destroy (botan_mac_t mac) |
BOTAN_DLL int | botan_mac_final (botan_mac_t mac, uint8_t out[]) |
BOTAN_DLL int | botan_mac_init (botan_mac_t *mac, const char *mac_name, uint32_t flags) |
BOTAN_DLL int | botan_mac_output_length (botan_mac_t mac, size_t *output_length) |
BOTAN_DLL int | botan_mac_set_key (botan_mac_t mac, const uint8_t *key, size_t key_len) |
BOTAN_DLL int | botan_mac_update (botan_mac_t mac, const uint8_t *buf, size_t len) |
BOTAN_DLL int | botan_mceies_decrypt (botan_privkey_t mce_key, const char *aead, const uint8_t ct[], size_t ct_len, const uint8_t ad[], size_t ad_len, uint8_t pt[], size_t *pt_len) |
BOTAN_DLL int | botan_mceies_encrypt (botan_pubkey_t mce_key, botan_rng_t rng, const char *aead, const uint8_t pt[], size_t pt_len, const uint8_t ad[], size_t ad_len, uint8_t ct[], size_t *ct_len) |
BOTAN_DLL int | botan_mp_add (botan_mp_t result, const botan_mp_t x, const botan_mp_t y) |
BOTAN_DLL int | botan_mp_clear (botan_mp_t mp) |
BOTAN_DLL int | botan_mp_clear_bit (botan_mp_t n, size_t bit) |
BOTAN_DLL int | botan_mp_cmp (int *result, const botan_mp_t x, const botan_mp_t y) |
BOTAN_DLL int | botan_mp_destroy (botan_mp_t mp) |
BOTAN_DLL int | botan_mp_div (botan_mp_t quotient, botan_mp_t remainder, const botan_mp_t x, const botan_mp_t y) |
BOTAN_DLL int | botan_mp_equal (const botan_mp_t x, const botan_mp_t y) |
BOTAN_DLL int | botan_mp_flip_sign (botan_mp_t mp) |
BOTAN_DLL int | botan_mp_from_bin (const botan_mp_t mp, const uint8_t vec[], size_t vec_len) |
BOTAN_DLL int | botan_mp_gcd (botan_mp_t out, const botan_mp_t x, const botan_mp_t y) |
BOTAN_DLL int | botan_mp_get_bit (const botan_mp_t n, size_t bit) |
BOTAN_DLL int | botan_mp_init (botan_mp_t *mp) |
BOTAN_DLL int | botan_mp_is_even (const botan_mp_t mp) |
BOTAN_DLL int | botan_mp_is_negative (const botan_mp_t mp) |
BOTAN_DLL int | botan_mp_is_odd (const botan_mp_t mp) |
BOTAN_DLL int | botan_mp_is_positive (const botan_mp_t mp) |
BOTAN_DLL int | botan_mp_is_prime (const botan_mp_t n, botan_rng_t rng, size_t test_prob) |
BOTAN_DLL int | botan_mp_is_zero (const botan_mp_t mp) |
BOTAN_DLL int | botan_mp_lshift (botan_mp_t out, const botan_mp_t in, size_t shift) |
BOTAN_DLL int | botan_mp_mod_inverse (botan_mp_t out, const botan_mp_t in, const botan_mp_t modulus) |
BOTAN_DLL int | botan_mp_mod_mul (botan_mp_t result, const botan_mp_t x, const botan_mp_t y, const botan_mp_t mod) |
BOTAN_DLL int | botan_mp_mul (botan_mp_t result, const botan_mp_t x, const botan_mp_t y) |
BOTAN_DLL int | botan_mp_num_bits (const botan_mp_t n, size_t *bits) |
BOTAN_DLL int | botan_mp_num_bytes (const botan_mp_t n, size_t *bytes) |
BOTAN_DLL int | botan_mp_powmod (botan_mp_t out, const botan_mp_t base, const botan_mp_t exponent, const botan_mp_t modulus) |
BOTAN_DLL int | botan_mp_rand_bits (botan_mp_t rand_out, botan_rng_t rng, size_t bits) |
BOTAN_DLL int | botan_mp_rand_range (botan_mp_t rand_out, botan_rng_t rng, const botan_mp_t lower_bound, const botan_mp_t upper_bound) |
BOTAN_DLL int | botan_mp_rshift (botan_mp_t out, const botan_mp_t in, size_t shift) |
BOTAN_DLL int | botan_mp_set_bit (botan_mp_t n, size_t bit) |
BOTAN_DLL int | botan_mp_set_from_int (botan_mp_t mp, int initial_value) |
BOTAN_DLL int | botan_mp_set_from_mp (botan_mp_t dest, const botan_mp_t source) |
BOTAN_DLL int | botan_mp_set_from_radix_str (botan_mp_t dest, const char *str, size_t radix) |
BOTAN_DLL int | botan_mp_set_from_str (botan_mp_t dest, const char *str) |
BOTAN_DLL int | botan_mp_sub (botan_mp_t result, const botan_mp_t x, const botan_mp_t y) |
BOTAN_DLL int | botan_mp_swap (botan_mp_t x, botan_mp_t y) |
BOTAN_DLL int | botan_mp_to_bin (const botan_mp_t mp, uint8_t vec[]) |
BOTAN_DLL int | botan_mp_to_hex (const botan_mp_t mp, char *out) |
BOTAN_DLL int | botan_mp_to_str (const botan_mp_t mp, uint8_t base, char *out, size_t *out_len) |
BOTAN_DLL int | botan_mp_to_uint32 (const botan_mp_t mp, uint32_t *val) |
BOTAN_DLL int | botan_pbkdf (const char *pbkdf_algo, uint8_t out[], size_t out_len, const char *passphrase, const uint8_t salt[], size_t salt_len, size_t iterations) |
BOTAN_DLL int | botan_pbkdf_timed (const char *pbkdf_algo, uint8_t out[], size_t out_len, const char *passphrase, const uint8_t salt[], size_t salt_len, size_t milliseconds_to_run, size_t *out_iterations_used) |
BOTAN_DLL int | botan_pk_op_decrypt (botan_pk_op_decrypt_t op, uint8_t out[], size_t *out_len, uint8_t ciphertext[], size_t ciphertext_len) |
BOTAN_DLL int | botan_pk_op_decrypt_create (botan_pk_op_decrypt_t *op, botan_privkey_t key, const char *padding, uint32_t flags) |
BOTAN_DLL int | botan_pk_op_decrypt_destroy (botan_pk_op_decrypt_t op) |
BOTAN_DLL int | botan_pk_op_encrypt (botan_pk_op_encrypt_t op, botan_rng_t rng, uint8_t out[], size_t *out_len, const uint8_t plaintext[], size_t plaintext_len) |
BOTAN_DLL int | botan_pk_op_encrypt_create (botan_pk_op_encrypt_t *op, botan_pubkey_t key, const char *padding, uint32_t flags) |
BOTAN_DLL int | botan_pk_op_encrypt_destroy (botan_pk_op_encrypt_t op) |
BOTAN_DLL int | botan_pk_op_key_agreement (botan_pk_op_ka_t op, uint8_t out[], size_t *out_len, const uint8_t other_key[], size_t other_key_len, const uint8_t salt[], size_t salt_len) |
BOTAN_DLL int | botan_pk_op_key_agreement_create (botan_pk_op_ka_t *op, botan_privkey_t key, const char *kdf, uint32_t flags) |
BOTAN_DLL int | botan_pk_op_key_agreement_destroy (botan_pk_op_ka_t op) |
BOTAN_DLL int | botan_pk_op_key_agreement_export_public (botan_privkey_t key, uint8_t out[], size_t *out_len) |
BOTAN_DLL int | botan_pk_op_sign_create (botan_pk_op_sign_t *op, botan_privkey_t key, const char *hash_and_padding, uint32_t flags) |
BOTAN_DLL int | botan_pk_op_sign_destroy (botan_pk_op_sign_t op) |
BOTAN_DLL int | botan_pk_op_sign_finish (botan_pk_op_sign_t op, botan_rng_t rng, uint8_t sig[], size_t *sig_len) |
BOTAN_DLL int | botan_pk_op_sign_update (botan_pk_op_sign_t op, const uint8_t in[], size_t in_len) |
BOTAN_DLL int | botan_pk_op_verify_create (botan_pk_op_verify_t *op, botan_pubkey_t key, const char *hash_and_padding, uint32_t flags) |
BOTAN_DLL int | botan_pk_op_verify_destroy (botan_pk_op_verify_t op) |
BOTAN_DLL int | botan_pk_op_verify_finish (botan_pk_op_verify_t op, const uint8_t sig[], size_t sig_len) |
BOTAN_DLL int | botan_pk_op_verify_update (botan_pk_op_verify_t op, const uint8_t in[], size_t in_len) |
BOTAN_DLL int | botan_privkey_check_key (botan_privkey_t key, botan_rng_t rng, uint32_t flags) |
BOTAN_DLL int | botan_privkey_create (botan_privkey_t *key, const char *algo_name, const char *algo_params, botan_rng_t rng) |
BOTAN_DLL int | botan_privkey_create_ecdh (botan_privkey_t *key, botan_rng_t rng, const char *params) |
BOTAN_DLL int | botan_privkey_create_ecdsa (botan_privkey_t *key, botan_rng_t rng, const char *params) |
BOTAN_DLL int | botan_privkey_create_mceliece (botan_privkey_t *key, botan_rng_t rng, size_t n, size_t t) |
BOTAN_DLL int | botan_privkey_create_rsa (botan_privkey_t *key, botan_rng_t rng, size_t n_bits) |
BOTAN_DLL int | botan_privkey_destroy (botan_privkey_t key) |
BOTAN_DLL int | botan_privkey_dsa_get_x (botan_mp_t n, botan_privkey_t key) |
BOTAN_DLL int | botan_privkey_export (botan_privkey_t key, uint8_t out[], size_t *out_len, uint32_t flags) |
BOTAN_DLL int | botan_privkey_export_encrypted (botan_privkey_t key, uint8_t out[], size_t *out_len, botan_rng_t rng, const char *passphrase, const char *encryption_algo, uint32_t flags) |
BOTAN_DLL int | botan_privkey_export_encrypted_pbkdf_iter (botan_privkey_t key, uint8_t out[], size_t *out_len, botan_rng_t rng, const char *passphrase, size_t pbkdf_iterations, const char *cipher_algo, const char *pbkdf_algo, uint32_t flags) |
BOTAN_DLL int | botan_privkey_export_encrypted_pbkdf_msec (botan_privkey_t key, uint8_t out[], size_t *out_len, botan_rng_t rng, const char *passphrase, uint32_t pbkdf_msec_runtime, size_t *pbkdf_iterations_out, const char *cipher_algo, const char *pbkdf_algo, uint32_t flags) |
BOTAN_DLL int | botan_privkey_export_pubkey (botan_pubkey_t *out, botan_privkey_t in) |
BOTAN_DLL int | botan_privkey_get_field (botan_mp_t output, botan_privkey_t key, const char *field_name) |
BOTAN_DLL int | botan_privkey_load (botan_privkey_t *key, botan_rng_t rng, const uint8_t bits[], size_t len, const char *password) |
BOTAN_DLL int | botan_privkey_load_dsa (botan_privkey_t *key, botan_mp_t p, botan_mp_t q, botan_mp_t g, botan_mp_t x) |
BOTAN_DLL int | botan_privkey_load_rsa (botan_privkey_t *key, botan_mp_t p, botan_mp_t q, botan_mp_t d) |
BOTAN_DLL int | botan_privkey_rsa_get_d (botan_mp_t d, botan_privkey_t rsa_key) |
BOTAN_DLL int | botan_privkey_rsa_get_e (botan_mp_t e, botan_privkey_t rsa_key) |
BOTAN_DLL int | botan_privkey_rsa_get_n (botan_mp_t n, botan_privkey_t rsa_key) |
BOTAN_DLL int | botan_privkey_rsa_get_p (botan_mp_t p, botan_privkey_t rsa_key) |
BOTAN_DLL int | botan_privkey_rsa_get_q (botan_mp_t q, botan_privkey_t rsa_key) |
BOTAN_DLL int | botan_pubkey_algo_name (botan_pubkey_t key, char out[], size_t *out_len) |
BOTAN_DLL int | botan_pubkey_check_key (botan_pubkey_t key, botan_rng_t rng, uint32_t flags) |
BOTAN_DLL int | botan_pubkey_destroy (botan_pubkey_t key) |
BOTAN_DLL int | botan_pubkey_dsa_get_g (botan_mp_t d, botan_pubkey_t key) |
BOTAN_DLL int | botan_pubkey_dsa_get_p (botan_mp_t p, botan_pubkey_t key) |
BOTAN_DLL int | botan_pubkey_dsa_get_q (botan_mp_t q, botan_pubkey_t key) |
BOTAN_DLL int | botan_pubkey_dsa_get_y (botan_mp_t y, botan_pubkey_t key) |
BOTAN_DLL int | botan_pubkey_estimated_strength (botan_pubkey_t key, size_t *estimate) |
BOTAN_DLL int | botan_pubkey_export (botan_pubkey_t key, uint8_t out[], size_t *out_len, uint32_t flags) |
BOTAN_DLL int | botan_pubkey_fingerprint (botan_pubkey_t key, const char *hash, uint8_t out[], size_t *out_len) |
BOTAN_DLL int | botan_pubkey_get_field (botan_mp_t output, botan_pubkey_t key, const char *field_name) |
BOTAN_DLL int | botan_pubkey_load (botan_pubkey_t *key, const uint8_t bits[], size_t len) |
BOTAN_DLL int | botan_pubkey_load_dsa (botan_pubkey_t *key, botan_mp_t p, botan_mp_t q, botan_mp_t g, botan_mp_t y) |
BOTAN_DLL int | botan_pubkey_load_rsa (botan_pubkey_t *key, botan_mp_t n, botan_mp_t e) |
BOTAN_DLL int | botan_pubkey_rsa_get_e (botan_mp_t e, botan_pubkey_t rsa_key) |
BOTAN_DLL int | botan_pubkey_rsa_get_n (botan_mp_t n, botan_pubkey_t rsa_key) |
BOTAN_DLL int | botan_rng_destroy (botan_rng_t rng) |
BOTAN_DLL int | botan_rng_get (botan_rng_t rng, uint8_t *out, size_t out_len) |
BOTAN_DLL int | botan_rng_init (botan_rng_t *rng, const char *rng_type) |
BOTAN_DLL int | botan_rng_reseed (botan_rng_t rng, size_t bits) |
BOTAN_DLL int | botan_same_mem (const uint8_t *x, const uint8_t *y, size_t len) |
BOTAN_DLL uint32_t | botan_version_datestamp () |
BOTAN_DLL uint32_t | botan_version_major () |
BOTAN_DLL uint32_t | botan_version_minor () |
BOTAN_DLL uint32_t | botan_version_patch () |
BOTAN_DLL const char * | botan_version_string () |
BOTAN_DLL int | botan_x509_cert_allowed_usage (botan_x509_cert_t cert, unsigned int key_usage) |
BOTAN_DLL int | botan_x509_cert_destroy (botan_x509_cert_t cert) |
BOTAN_DLL int | botan_x509_cert_gen_selfsigned (botan_x509_cert_t *cert, botan_privkey_t key, botan_rng_t rng, const char *common_name, const char *org_name) |
BOTAN_DLL int | botan_x509_cert_get_authority_key_id (botan_x509_cert_t cert, uint8_t out[], size_t *out_len) |
BOTAN_DLL int | botan_x509_cert_get_fingerprint (botan_x509_cert_t cert, const char *hash, uint8_t out[], size_t *out_len) |
BOTAN_DLL int | botan_x509_cert_get_issuer_dn (botan_x509_cert_t cert, const char *key, size_t index, uint8_t out[], size_t *out_len) |
BOTAN_DLL int | botan_x509_cert_get_public_key (botan_x509_cert_t cert, botan_pubkey_t *key) |
BOTAN_DLL int | botan_x509_cert_get_public_key_bits (botan_x509_cert_t cert, uint8_t out[], size_t *out_len) |
BOTAN_DLL int | botan_x509_cert_get_serial_number (botan_x509_cert_t cert, uint8_t out[], size_t *out_len) |
BOTAN_DLL int | botan_x509_cert_get_subject_dn (botan_x509_cert_t cert, const char *key, size_t index, uint8_t out[], size_t *out_len) |
BOTAN_DLL int | botan_x509_cert_get_subject_key_id (botan_x509_cert_t cert, uint8_t out[], size_t *out_len) |
BOTAN_DLL int | botan_x509_cert_get_time_expires (botan_x509_cert_t cert, char out[], size_t *out_len) |
BOTAN_DLL int | botan_x509_cert_get_time_starts (botan_x509_cert_t cert, char out[], size_t *out_len) |
BOTAN_DLL int | botan_x509_cert_load (botan_x509_cert_t *cert_obj, const uint8_t cert[], size_t cert_len) |
BOTAN_DLL int | botan_x509_cert_load_file (botan_x509_cert_t *cert_obj, const char *filename) |
BOTAN_DLL int | botan_x509_cert_path_verify (botan_x509_cert_t cert, const char *ca_dir) |
BOTAN_DLL int | botan_x509_cert_to_string (botan_x509_cert_t cert, char out[], size_t *out_len) |
#define BOTAN_CHECK_KEY_EXPENSIVE_TESTS 1 |
Definition at line 639 of file ffi.h.
Referenced by botan_privkey_check_key(), and botan_pubkey_check_key().
#define BOTAN_CIPHER_INIT_FLAG_ENCRYPT 0 |
Definition at line 346 of file ffi.h.
Referenced by botan_cipher_init().
#define BOTAN_CIPHER_INIT_FLAG_MASK_DIRECTION 1 |
Definition at line 345 of file ffi.h.
Referenced by botan_cipher_init().
#define BOTAN_CIPHER_UPDATE_FLAG_FINAL (1U << 0) |
Definition at line 369 of file ffi.h.
Referenced by botan_cipher_update().
#define BOTAN_FFI_ERROR_BAD_FLAG (-30) |
Definition at line 139 of file ffi.h.
Referenced by botan_bcrypt_generate(), botan_hash_init(), botan_pk_op_decrypt_create(), botan_pk_op_encrypt_create(), botan_pk_op_key_agreement_create(), botan_pk_op_sign_create(), and botan_pk_op_verify_create().
#define BOTAN_FFI_ERROR_EXCEPTION_THROWN (-20) |
Definition at line 138 of file ffi.h.
Referenced by botan_bcrypt_generate(), botan_bcrypt_is_valid(), botan_block_cipher_init(), botan_hash_init(), botan_pk_op_sign_create(), botan_privkey_create(), botan_privkey_create_ecdh(), botan_privkey_create_ecdsa(), botan_privkey_create_mceliece(), botan_privkey_create_rsa(), botan_privkey_export_pubkey(), and botan_x509_cert_get_public_key().
#define BOTAN_FFI_ERROR_NOT_IMPLEMENTED (-40) |
Definition at line 141 of file ffi.h.
Referenced by botan_bcrypt_generate(), botan_bcrypt_is_valid(), botan_mceies_decrypt(), botan_mceies_encrypt(), botan_mp_set_from_radix_str(), botan_privkey_create(), botan_privkey_create_ecdsa(), botan_privkey_create_mceliece(), botan_privkey_create_rsa(), botan_privkey_load_dsa(), botan_privkey_load_rsa(), botan_pubkey_load_dsa(), botan_pubkey_load_rsa(), botan_x509_cert_get_public_key(), and botan_x509_cert_load_file().
#define BOTAN_FFI_ERROR_NULL_POINTER (-31) |
Definition at line 140 of file ffi.h.
Referenced by botan_block_cipher_init(), botan_hash_init(), botan_mp_to_uint32(), botan_privkey_create(), botan_privkey_get_field(), and botan_pubkey_get_field().
#define BOTAN_FFI_HEX_LOWER_CASE 1 |
Definition at line 150 of file ffi.h.
Referenced by botan_hex_encode().
#define BOTAN_PRIVKEY_EXPORT_FLAG_DER 0 |
Definition at line 658 of file ffi.h.
Referenced by botan_privkey_export(), botan_privkey_export_encrypted_pbkdf_iter(), botan_privkey_export_encrypted_pbkdf_msec(), and botan_pubkey_export().
#define BOTAN_PRIVKEY_EXPORT_FLAG_PEM 1 |
Definition at line 659 of file ffi.h.
Referenced by botan_privkey_export(), botan_privkey_export_encrypted_pbkdf_iter(), botan_privkey_export_encrypted_pbkdf_msec(), and botan_pubkey_export().
typedef struct botan_block_cipher_struct* botan_block_cipher_t |
typedef struct botan_cipher_struct* botan_cipher_t |
typedef struct botan_hash_struct* botan_hash_t |
typedef struct botan_mac_struct* botan_mac_t |
typedef struct botan_mp_struct* botan_mp_t |
typedef struct botan_pk_op_decrypt_struct* botan_pk_op_decrypt_t |
typedef struct botan_pk_op_encrypt_struct* botan_pk_op_encrypt_t |
typedef struct botan_pk_op_ka_struct* botan_pk_op_ka_t |
typedef struct botan_pk_op_sign_struct* botan_pk_op_sign_t |
typedef struct botan_pk_op_verify_struct* botan_pk_op_verify_t |
typedef struct botan_privkey_struct* botan_privkey_t |
typedef struct botan_pubkey_struct* botan_pubkey_t |
typedef struct botan_rng_struct* botan_rng_t |
typedef struct botan_x509_cert_struct* botan_x509_cert_t |
Enumerator | |
---|---|
NO_CONSTRAINTS | |
DIGITAL_SIGNATURE | |
NON_REPUDIATION | |
KEY_ENCIPHERMENT | |
DATA_ENCIPHERMENT | |
KEY_AGREEMENT | |
KEY_CERT_SIGN | |
CRL_SIGN | |
ENCIPHER_ONLY | |
DECIPHER_ONLY |
BOTAN_DLL int botan_bcrypt_generate | ( | uint8_t * | out, |
size_t * | out_len, | ||
const char * | password, | ||
botan_rng_t | rng, | ||
size_t | work_factor, | ||
uint32_t | flags | ||
) |
Create a password hash using Bcrypt
out | buffer holding the password hash, should be of length 64 bytes |
out_len | the desired output length in bytes |
password | the password |
rng | a random number generator |
work_factor | how much work to do to slow down guessing attacks |
flags | should be 0 in current API revision, all other uses are reserved and return BOTAN_FFI_ERROR_BAD_FLAG |
Output is formatted bcrypt $2a$...
Definition at line 1053 of file ffi.cpp.
References BOTAN_ASSERT_ARG_NON_NULL, BOTAN_CURRENT_FUNCTION, BOTAN_FFI_ERROR_BAD_FLAG, BOTAN_FFI_ERROR_EXCEPTION_THROWN, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, Botan::generate_bcrypt(), and Botan::ASN1::to_string().
BOTAN_DLL int botan_bcrypt_is_valid | ( | const char * | pass, |
const char * | hash | ||
) |
Check a previously created password hash
pass | the password to check against |
hash | the stored hash to check against |
Definition at line 1090 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, BOTAN_FFI_ERROR_EXCEPTION_THROWN, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, and Botan::check_bcrypt().
BOTAN_DLL 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 652 of file ffi.cpp.
References Botan::BlockCipher::block_size(), and BOTAN_FFI_DO.
BOTAN_DLL int botan_block_cipher_clear | ( | botan_block_cipher_t | bc | ) |
Reinitializes the block cipher
Definition at line 634 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::SymmetricAlgorithm::clear().
BOTAN_DLL int botan_block_cipher_decrypt_blocks | ( | botan_block_cipher_t | bc, |
const uint8_t | in[], | ||
uint8_t | out[], | ||
size_t | blocks | ||
) |
Definition at line 665 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::BlockCipher::decrypt_n().
BOTAN_DLL int botan_block_cipher_destroy | ( | botan_block_cipher_t | bc | ) |
BOTAN_DLL int botan_block_cipher_encrypt_blocks | ( | botan_block_cipher_t | bc, |
const uint8_t | in[], | ||
uint8_t | out[], | ||
size_t | blocks | ||
) |
Definition at line 657 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::BlockCipher::encrypt_n().
BOTAN_DLL int botan_block_cipher_init | ( | botan_block_cipher_t * | bc, |
const char * | cipher_name | ||
) |
Initialize a block cipher object
Definition at line 598 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, BOTAN_FFI_ERROR_EXCEPTION_THROWN, BOTAN_FFI_ERROR_NULL_POINTER, and Botan::BlockCipher::create().
BOTAN_DLL 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 642 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::SymmetricAlgorithm::set_key().
BOTAN_DLL int botan_cipher_clear | ( | botan_cipher_t | hash | ) |
Definition at line 814 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::Cipher_Mode::clear().
BOTAN_DLL int botan_cipher_destroy | ( | botan_cipher_t | cipher | ) |
BOTAN_DLL int botan_cipher_get_default_nonce_length | ( | botan_cipher_t | cipher, |
size_t * | nl | ||
) |
Definition at line 977 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::Cipher_Mode::default_nonce_length().
BOTAN_DLL int botan_cipher_get_tag_length | ( | botan_cipher_t | cipher, |
size_t * | tag_size | ||
) |
Definition at line 987 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::Cipher_Mode::tag_size().
BOTAN_DLL int botan_cipher_get_update_granularity | ( | botan_cipher_t | cipher, |
size_t * | ug | ||
) |
Definition at line 982 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::Cipher_Mode::update_granularity().
BOTAN_DLL int botan_cipher_init | ( | botan_cipher_t * | cipher, |
const char * | name, | ||
uint32_t | flags | ||
) |
Definition at line 784 of file ffi.cpp.
References BOTAN_CIPHER_INIT_FLAG_ENCRYPT, BOTAN_CIPHER_INIT_FLAG_MASK_DIRECTION, BOTAN_CURRENT_FUNCTION, Botan::DECRYPTION, Botan::ENCRYPTION, and Botan::get_cipher_mode().
BOTAN_DLL int botan_cipher_query_keylen | ( | botan_cipher_t | , |
size_t * | out_minimum_keylength, | ||
size_t * | out_maximum_keylength | ||
) |
Definition at line 819 of file ffi.cpp.
References BOTAN_FFI_DO, Botan::Cipher_Mode::key_spec(), and Botan::Key_Length_Specification::minimum_keylength().
BOTAN_DLL int botan_cipher_set_associated_data | ( | botan_cipher_t | cipher, |
const uint8_t * | ad, | ||
size_t | ad_len | ||
) |
Definition at line 958 of file ffi.cpp.
References BOTAN_FFI_DO.
BOTAN_DLL int botan_cipher_set_key | ( | botan_cipher_t | cipher, |
const uint8_t * | key, | ||
size_t | key_len | ||
) |
Definition at line 829 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::Cipher_Mode::set_key().
BOTAN_DLL int botan_cipher_start | ( | botan_cipher_t | cipher, |
const uint8_t * | nonce, | ||
size_t | nonce_len | ||
) |
Definition at line 835 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, Botan::Cipher_Mode::start(), and Botan::Cipher_Mode::update_granularity().
BOTAN_DLL int botan_cipher_update | ( | botan_cipher_t | cipher, |
uint32_t | flags, | ||
uint8_t | output[], | ||
size_t | output_size, | ||
size_t * | output_written, | ||
const uint8_t | input_bytes[], | ||
size_t | input_size, | ||
size_t * | input_consumed | ||
) |
Definition at line 853 of file ffi.cpp.
References BOTAN_ASSERT, BOTAN_CIPHER_UPDATE_FLAG_FINAL, BOTAN_CURRENT_FUNCTION, Botan::copy_mem(), Botan::Cipher_Mode::finish(), Botan::Cipher_Mode::minimum_final_size(), Botan::round_down(), Botan::Cipher_Mode::update(), Botan::Cipher_Mode::update_granularity(), and Botan::Exception::what().
BOTAN_DLL int botan_cipher_valid_nonce_length | ( | botan_cipher_t | cipher, |
size_t | nl | ||
) |
Definition at line 972 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::Cipher_Mode::valid_nonce_length().
BOTAN_DLL uint32_t botan_ffi_api_version | ( | ) |
BOTAN_DLL int botan_ffi_supports_api | ( | uint32_t | api_version | ) |
Return 0 (ok) if the version given is one this library supports. botan_ffi_supports_api(botan_ffi_api_version()) will always return 0.
BOTAN_DLL int botan_hash_clear | ( | botan_hash_t | hash | ) |
Reinitializes the state of the hash computation. A hash can be computed (with update/final) immediately.
hash | hash object |
Definition at line 712 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::HashFunction::clear().
BOTAN_DLL int botan_hash_destroy | ( | botan_hash_t | hash | ) |
BOTAN_DLL int botan_hash_final | ( | botan_hash_t | hash, |
uint8_t | out[] | ||
) |
Finalizes the hash computation and writes the output to out[0:botan_hash_output_length()] then reinitializes for computing another digest as if botan_hash_clear had been called.
hash | hash object |
out | output buffer |
Definition at line 722 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::Buffered_Computation::final().
BOTAN_DLL int botan_hash_init | ( | botan_hash_t * | hash, |
const char * | hash_name, | ||
uint32_t | flags | ||
) |
Initialize a hash function object
hash | hash object |
hash_name | name of the hash function, e.g., "SHA-384" |
flags | should be 0 in current API revision, all other uses are reserved and return BOTAN_FFI_ERROR_BAD_FLAG |
TODO: since output_length is effectively required to use this API, return it from init as an output parameter
Definition at line 673 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, BOTAN_FFI_ERROR_BAD_FLAG, BOTAN_FFI_ERROR_EXCEPTION_THROWN, BOTAN_FFI_ERROR_NULL_POINTER, and Botan::HashFunction::create().
BOTAN_DLL int botan_hash_name | ( | botan_hash_t | hash, |
char * | name, | ||
size_t | name_len | ||
) |
TODO has no implementation
BOTAN_DLL int botan_hash_output_length | ( | botan_hash_t | hash, |
size_t * | output_length | ||
) |
Writes the output length of the hash function to *output_length
hash | hash object |
output_length | output buffer to hold the hash function output length |
Definition at line 707 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::Buffered_Computation::output_length().
BOTAN_DLL int botan_hash_update | ( | botan_hash_t | hash, |
const uint8_t * | in, | ||
size_t | in_len | ||
) |
Send more input to the hash function
hash | hash object |
in | input buffer |
in_len | number of bytes to read from the input buffer |
Definition at line 717 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::Buffered_Computation::update().
BOTAN_DLL int botan_hex_encode | ( | const uint8_t * | x, |
size_t | len, | ||
char * | out, | ||
uint32_t | flags | ||
) |
Perform hex encoding
x | is some binary data |
len | length of x in bytes |
out | an array of at least x*2 bytes |
flags | flags out be upper or lower case? |
Definition at line 273 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, BOTAN_FFI_HEX_LOWER_CASE, and Botan::hex_encode().
BOTAN_DLL int botan_kdf | ( | const char * | kdf_algo, |
uint8_t | out[], | ||
size_t | out_len, | ||
const uint8_t | secret[], | ||
size_t | secret_len, | ||
const uint8_t | salt[], | ||
size_t | salt_len, | ||
const uint8_t | label[], | ||
size_t | label_len | ||
) |
Derive a key
kdf_algo | KDF algorithm, e.g., "SP800-56C" |
out | buffer holding the derived key, must be of length out_len |
out_len | the desired output length in bytes |
secret | the secret input |
secret_len | size of secret in bytes |
salt | a diversifier |
salt_len | size of salt in bytes |
label | purpose for the derived keying material |
label_len | size of label in bytes |
Definition at line 1033 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, and Botan::get_kdf().
BOTAN_DLL int botan_mac_clear | ( | botan_mac_t | mac | ) |
Reinitializes the state of the MAC computation. A MAC can be computed (with update/final) immediately.
mac | mac object |
Definition at line 769 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::SymmetricAlgorithm::clear().
BOTAN_DLL int botan_mac_destroy | ( | botan_mac_t | mac | ) |
BOTAN_DLL int botan_mac_final | ( | botan_mac_t | mac, |
uint8_t | out[] | ||
) |
Finalizes the MAC computation and writes the output to out[0:botan_mac_output_length()] then reinitializes for computing another MAC as if botan_mac_clear had been called.
mac | mac object |
out | output buffer |
Definition at line 779 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::Buffered_Computation::final().
BOTAN_DLL int botan_mac_init | ( | botan_mac_t * | mac, |
const char * | mac_name, | ||
uint32_t | flags | ||
) |
Initialize a message authentication code object
mac | mac object |
mac_name | name of the hash function, e.g., "HMAC(SHA-384)" |
flags | should be 0 in current API revision, all other uses are reserved and return a negative value (error code) |
Definition at line 727 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, and Botan::MessageAuthenticationCode::create().
BOTAN_DLL int botan_mac_output_length | ( | botan_mac_t | mac, |
size_t * | output_length | ||
) |
Writes the output length of the message authentication code to *output_length
mac | mac object |
output_length | output buffer to hold the MAC output length |
Definition at line 764 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::Buffered_Computation::output_length().
BOTAN_DLL int botan_mac_set_key | ( | botan_mac_t | mac, |
const uint8_t * | key, | ||
size_t | key_len | ||
) |
Sets the key on the MAC
mac | mac object |
key | buffer holding the key |
key_len | size of the key buffer in bytes |
Definition at line 759 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::SymmetricAlgorithm::set_key().
BOTAN_DLL int botan_mac_update | ( | botan_mac_t | mac, |
const uint8_t * | buf, | ||
size_t | len | ||
) |
Send more input to the message authentication code
mac | mac object |
buf | input buffer |
len | number of bytes to read from the input buffer |
Definition at line 774 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::Buffered_Computation::update().
BOTAN_DLL int botan_mceies_decrypt | ( | botan_privkey_t | mce_key, |
const char * | aead, | ||
const uint8_t | ct[], | ||
size_t | ct_len, | ||
const uint8_t | ad[], | ||
size_t | ad_len, | ||
uint8_t | pt[], | ||
size_t * | pt_len | ||
) |
Definition at line 2208 of file ffi.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, and Botan::mceies_decrypt().
BOTAN_DLL int botan_mceies_encrypt | ( | botan_pubkey_t | mce_key, |
botan_rng_t | rng, | ||
const char * | aead, | ||
const uint8_t | pt[], | ||
size_t | pt_len, | ||
const uint8_t | ad[], | ||
size_t | ad_len, | ||
uint8_t | ct[], | ||
size_t * | ct_len | ||
) |
Definition at line 2235 of file ffi.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, and Botan::mceies_encrypt().
BOTAN_DLL int botan_mp_add | ( | botan_mp_t | result, |
const botan_mp_t | x, | ||
const botan_mp_t | y | ||
) |
BOTAN_DLL int botan_mp_clear | ( | botan_mp_t | mp | ) |
Definition at line 347 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::BigInt::clear().
BOTAN_DLL int botan_mp_clear_bit | ( | botan_mp_t | n, |
size_t | bit | ||
) |
Clear the specified bit
Definition at line 583 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::BigInt::clear_bit().
BOTAN_DLL int botan_mp_cmp | ( | int * | result, |
const botan_mp_t | x, | ||
const botan_mp_t | y | ||
) |
Definition at line 506 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::BigInt::cmp().
BOTAN_DLL int botan_mp_destroy | ( | botan_mp_t | mp | ) |
BOTAN_DLL int botan_mp_div | ( | botan_mp_t | quotient, |
botan_mp_t | remainder, | ||
const botan_mp_t | x, | ||
const botan_mp_t | y | ||
) |
Definition at line 475 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::divide().
BOTAN_DLL int botan_mp_equal | ( | const botan_mp_t | x, |
const botan_mp_t | y | ||
) |
BOTAN_DLL int botan_mp_flip_sign | ( | botan_mp_t | mp | ) |
Definition at line 405 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::BigInt::flip_sign().
BOTAN_DLL int botan_mp_from_bin | ( | const botan_mp_t | mp, |
const uint8_t | vec[], | ||
size_t | vec_len | ||
) |
Definition at line 410 of file ffi.cpp.
References Botan::BigInt::binary_decode(), and BOTAN_FFI_DO.
BOTAN_DLL int botan_mp_gcd | ( | botan_mp_t | out, |
const botan_mp_t | x, | ||
const botan_mp_t | y | ||
) |
Definition at line 561 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::gcd().
BOTAN_DLL int botan_mp_get_bit | ( | const botan_mp_t | n, |
size_t | bit | ||
) |
Returns 0 if specified bit of n is not set Returns 1 if specified bit of n is set Returns negative number on error
Definition at line 573 of file ffi.cpp.
References BOTAN_FFI_DO.
BOTAN_DLL int botan_mp_init | ( | botan_mp_t * | mp | ) |
Definition at line 341 of file ffi.cpp.
BOTAN_DLL int botan_mp_is_even | ( | const botan_mp_t | mp | ) |
Definition at line 501 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::BigInt::is_even().
BOTAN_DLL int botan_mp_is_negative | ( | const botan_mp_t | mp | ) |
Return true iff mp is less than 0
Definition at line 395 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::BigInt::is_negative().
BOTAN_DLL int botan_mp_is_odd | ( | const botan_mp_t | mp | ) |
Definition at line 496 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::BigInt::is_odd().
BOTAN_DLL int botan_mp_is_positive | ( | const botan_mp_t | mp | ) |
Return true iff mp is greater than 0
Definition at line 400 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::BigInt::is_positive().
BOTAN_DLL int botan_mp_is_prime | ( | const botan_mp_t | n, |
botan_rng_t | rng, | ||
size_t | test_prob | ||
) |
Returns 0 if n is not prime Returns 1 if n is prime Returns negative number on error
Definition at line 567 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::is_prime().
BOTAN_DLL int botan_mp_is_zero | ( | const botan_mp_t | mp | ) |
Definition at line 491 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::BigInt::is_zero().
BOTAN_DLL int botan_mp_lshift | ( | botan_mp_t | out, |
const botan_mp_t | in, | ||
size_t | shift | ||
) |
BOTAN_DLL int botan_mp_mod_inverse | ( | botan_mp_t | out, |
const botan_mp_t | in, | ||
const botan_mp_t | modulus | ||
) |
Definition at line 533 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::inverse_mod().
BOTAN_DLL int botan_mp_mod_mul | ( | botan_mp_t | result, |
const botan_mp_t | x, | ||
const botan_mp_t | y, | ||
const botan_mp_t | mod | ||
) |
Definition at line 538 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::Modular_Reducer::multiply().
BOTAN_DLL int botan_mp_mul | ( | botan_mp_t | result, |
const botan_mp_t | x, | ||
const botan_mp_t | y | ||
) |
BOTAN_DLL int botan_mp_num_bits | ( | const botan_mp_t | n, |
size_t * | bits | ||
) |
Definition at line 588 of file ffi.cpp.
References Botan::BigInt::bits(), and BOTAN_FFI_DO.
BOTAN_DLL int botan_mp_num_bytes | ( | const botan_mp_t | n, |
size_t * | bytes | ||
) |
Definition at line 593 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::BigInt::bytes().
BOTAN_DLL int botan_mp_powmod | ( | botan_mp_t | out, |
const botan_mp_t | base, | ||
const botan_mp_t | exponent, | ||
const botan_mp_t | modulus | ||
) |
Definition at line 517 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::power_mod().
BOTAN_DLL int botan_mp_rand_bits | ( | botan_mp_t | rand_out, |
botan_rng_t | rng, | ||
size_t | bits | ||
) |
Definition at line 546 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::RandomNumberGenerator::randomize().
BOTAN_DLL int botan_mp_rand_range | ( | botan_mp_t | rand_out, |
botan_rng_t | rng, | ||
const botan_mp_t | lower_bound, | ||
const botan_mp_t | upper_bound | ||
) |
Definition at line 552 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::BigInt::random_integer().
BOTAN_DLL int botan_mp_rshift | ( | botan_mp_t | out, |
const botan_mp_t | in, | ||
size_t | shift | ||
) |
BOTAN_DLL int botan_mp_set_bit | ( | botan_mp_t | n, |
size_t | bit | ||
) |
Set the specified bit
Definition at line 578 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::BigInt::set_bit().
BOTAN_DLL int botan_mp_set_from_int | ( | botan_mp_t | mp, |
int | initial_value | ||
) |
BOTAN_DLL int botan_mp_set_from_mp | ( | botan_mp_t | dest, |
const botan_mp_t | source | ||
) |
BOTAN_DLL int botan_mp_set_from_radix_str | ( | botan_mp_t | dest, |
const char * | str, | ||
size_t | radix | ||
) |
Definition at line 372 of file ffi.cpp.
References BOTAN_FFI_DO, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, Botan::BigInt::Decimal, Botan::BigInt::decode(), and Botan::BigInt::Hexadecimal.
BOTAN_DLL int botan_mp_set_from_str | ( | botan_mp_t | dest, |
const char * | str | ||
) |
BOTAN_DLL int botan_mp_sub | ( | botan_mp_t | result, |
const botan_mp_t | x, | ||
const botan_mp_t | y | ||
) |
BOTAN_DLL int botan_mp_swap | ( | botan_mp_t | x, |
botan_mp_t | y | ||
) |
Definition at line 511 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::BigInt::swap().
BOTAN_DLL int botan_mp_to_bin | ( | const botan_mp_t | mp, |
uint8_t | vec[] | ||
) |
Definition at line 441 of file ffi.cpp.
References Botan::BigInt::binary_encode(), and BOTAN_FFI_DO.
BOTAN_DLL int botan_mp_to_hex | ( | const botan_mp_t | mp, |
char * | out | ||
) |
Definition at line 415 of file ffi.cpp.
References BOTAN_FFI_DO, Botan::BigInt::encode(), and Botan::BigInt::Hexadecimal.
BOTAN_DLL int botan_mp_to_str | ( | const botan_mp_t | mp, |
uint8_t | base, | ||
char * | out, | ||
size_t * | out_len | ||
) |
Definition at line 424 of file ffi.cpp.
References BOTAN_FFI_DO, Botan::BigInt::Decimal, Botan::BigInt::encode(), and Botan::BigInt::Hexadecimal.
BOTAN_DLL int botan_mp_to_uint32 | ( | const botan_mp_t | mp, |
uint32_t * | val | ||
) |
Definition at line 446 of file ffi.cpp.
References BOTAN_FFI_DO, BOTAN_FFI_ERROR_NULL_POINTER, and Botan::BigInt::to_u32bit().
BOTAN_DLL int botan_pbkdf | ( | const char * | pbkdf_algo, |
uint8_t | out[], | ||
size_t | out_len, | ||
const char * | passphrase, | ||
const uint8_t | salt[], | ||
size_t | salt_len, | ||
size_t | iterations | ||
) |
Definition at line 992 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, and Botan::get_pbkdf().
BOTAN_DLL int botan_pbkdf_timed | ( | const char * | pbkdf_algo, |
uint8_t | out[], | ||
size_t | out_len, | ||
const char * | passphrase, | ||
const uint8_t | salt[], | ||
size_t | salt_len, | ||
size_t | milliseconds_to_run, | ||
size_t * | out_iterations_used | ||
) |
Derive a key from a passphrase, running until msec time has elapsed.
pbkdf_algo | PBKDF algorithm, e.g., "PBKDF2" |
out | buffer to store the derived key, must be of out_len bytes |
out_len | the desired length of the key to produce |
passphrase | the password to derive the key from |
salt | a randomly chosen salt |
salt_len | length of salt in bytes |
milliseconds_to_run | if iterations is zero, then instead the PBKDF is run until milliseconds_to_run milliseconds has passed |
out_iterations_used | set to the number iterations executed |
Definition at line 1010 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, and Botan::get_pbkdf().
BOTAN_DLL int botan_pk_op_decrypt | ( | botan_pk_op_decrypt_t | op, |
uint8_t | out[], | ||
size_t * | out_len, | ||
uint8_t | ciphertext[], | ||
size_t | ciphertext_len | ||
) |
BOTAN_DLL int botan_pk_op_decrypt_create | ( | botan_pk_op_decrypt_t * | op, |
botan_privkey_t | key, | ||
const char * | padding, | ||
uint32_t | flags | ||
) |
Definition at line 1857 of file ffi.cpp.
References BOTAN_ASSERT_NONNULL, BOTAN_CURRENT_FUNCTION, BOTAN_FFI_ERROR_BAD_FLAG, and Botan::system_rng().
BOTAN_DLL int botan_pk_op_decrypt_destroy | ( | botan_pk_op_decrypt_t | op | ) |
BOTAN_DLL int botan_pk_op_encrypt | ( | botan_pk_op_encrypt_t | op, |
botan_rng_t | rng, | ||
uint8_t | out[], | ||
size_t * | out_len, | ||
const uint8_t | plaintext[], | ||
size_t | plaintext_len | ||
) |
BOTAN_DLL int botan_pk_op_encrypt_create | ( | botan_pk_op_encrypt_t * | op, |
botan_pubkey_t | key, | ||
const char * | padding, | ||
uint32_t | flags | ||
) |
Definition at line 1812 of file ffi.cpp.
References BOTAN_ASSERT_NONNULL, BOTAN_CURRENT_FUNCTION, BOTAN_FFI_ERROR_BAD_FLAG, and Botan::system_rng().
BOTAN_DLL int botan_pk_op_encrypt_destroy | ( | botan_pk_op_encrypt_t | op | ) |
BOTAN_DLL int botan_pk_op_key_agreement | ( | botan_pk_op_ka_t | op, |
uint8_t | out[], | ||
size_t * | out_len, | ||
const uint8_t | other_key[], | ||
size_t | other_key_len, | ||
const uint8_t | salt[], | ||
size_t | salt_len | ||
) |
Definition at line 2034 of file ffi.cpp.
References BOTAN_FFI_DO.
BOTAN_DLL int botan_pk_op_key_agreement_create | ( | botan_pk_op_ka_t * | op, |
botan_privkey_t | key, | ||
const char * | kdf, | ||
uint32_t | flags | ||
) |
Definition at line 1992 of file ffi.cpp.
References BOTAN_ASSERT_NONNULL, BOTAN_CURRENT_FUNCTION, BOTAN_FFI_ERROR_BAD_FLAG, and Botan::system_rng().
BOTAN_DLL int botan_pk_op_key_agreement_destroy | ( | botan_pk_op_ka_t | op | ) |
BOTAN_DLL int botan_pk_op_key_agreement_export_public | ( | botan_privkey_t | key, |
uint8_t | out[], | ||
size_t * | out_len | ||
) |
BOTAN_DLL int botan_pk_op_sign_create | ( | botan_pk_op_sign_t * | op, |
botan_privkey_t | key, | ||
const char * | hash_and_padding, | ||
uint32_t | flags | ||
) |
Definition at line 1901 of file ffi.cpp.
References BOTAN_ASSERT_NONNULL, BOTAN_CURRENT_FUNCTION, BOTAN_FFI_ERROR_BAD_FLAG, BOTAN_FFI_ERROR_EXCEPTION_THROWN, and Botan::system_rng().
BOTAN_DLL int botan_pk_op_sign_destroy | ( | botan_pk_op_sign_t | op | ) |
BOTAN_DLL int botan_pk_op_sign_finish | ( | botan_pk_op_sign_t | op, |
botan_rng_t | rng, | ||
uint8_t | sig[], | ||
size_t * | sig_len | ||
) |
BOTAN_DLL int botan_pk_op_sign_update | ( | botan_pk_op_sign_t | op, |
const uint8_t | in[], | ||
size_t | in_len | ||
) |
BOTAN_DLL int botan_pk_op_verify_create | ( | botan_pk_op_verify_t * | op, |
botan_pubkey_t | key, | ||
const char * | hash_and_padding, | ||
uint32_t | flags | ||
) |
Definition at line 1945 of file ffi.cpp.
References BOTAN_ASSERT_NONNULL, BOTAN_CURRENT_FUNCTION, and BOTAN_FFI_ERROR_BAD_FLAG.
BOTAN_DLL int botan_pk_op_verify_destroy | ( | botan_pk_op_verify_t | op | ) |
BOTAN_DLL int botan_pk_op_verify_finish | ( | botan_pk_op_verify_t | op, |
const uint8_t | sig[], | ||
size_t | sig_len | ||
) |
Definition at line 1980 of file ffi.cpp.
References BOTAN_FFI_DO.
BOTAN_DLL int botan_pk_op_verify_update | ( | botan_pk_op_verify_t | op, |
const uint8_t | in[], | ||
size_t | in_len | ||
) |
BOTAN_DLL int botan_privkey_check_key | ( | botan_privkey_t | key, |
botan_rng_t | rng, | ||
uint32_t | flags | ||
) |
Definition at line 1673 of file ffi.cpp.
References BOTAN_CHECK_KEY_EXPENSIVE_TESTS, and BOTAN_FFI_DO.
BOTAN_DLL int botan_privkey_create | ( | botan_privkey_t * | key, |
const char * | algo_name, | ||
const char * | algo_params, | ||
botan_rng_t | rng | ||
) |
Definition at line 1113 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, BOTAN_FFI_ERROR_EXCEPTION_THROWN, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, and Botan::create_private_key().
BOTAN_DLL int botan_privkey_create_ecdh | ( | botan_privkey_t * | key, |
botan_rng_t | rng, | ||
const char * | params | ||
) |
Definition at line 1235 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, and BOTAN_FFI_ERROR_EXCEPTION_THROWN.
BOTAN_DLL int botan_privkey_create_ecdsa | ( | botan_privkey_t * | key, |
botan_rng_t | rng, | ||
const char * | params | ||
) |
Definition at line 1183 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, BOTAN_FFI_ERROR_EXCEPTION_THROWN, and BOTAN_FFI_ERROR_NOT_IMPLEMENTED.
BOTAN_DLL int botan_privkey_create_mceliece | ( | botan_privkey_t * | key, |
botan_rng_t | rng, | ||
size_t | n, | ||
size_t | t | ||
) |
Definition at line 1210 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, BOTAN_FFI_ERROR_EXCEPTION_THROWN, and BOTAN_FFI_ERROR_NOT_IMPLEMENTED.
BOTAN_DLL int botan_privkey_create_rsa | ( | botan_privkey_t * | key, |
botan_rng_t | rng, | ||
size_t | n_bits | ||
) |
Definition at line 1154 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, BOTAN_FFI_ERROR_EXCEPTION_THROWN, and BOTAN_FFI_ERROR_NOT_IMPLEMENTED.
BOTAN_DLL int botan_privkey_destroy | ( | botan_privkey_t | key | ) |
BOTAN_DLL int botan_privkey_dsa_get_x | ( | botan_mp_t | n, |
botan_privkey_t | key | ||
) |
Definition at line 1607 of file ffi.cpp.
References botan_privkey_get_field().
BOTAN_DLL int botan_privkey_export | ( | botan_privkey_t | key, |
uint8_t | out[], | ||
size_t * | out_len, | ||
uint32_t | flags | ||
) |
Definition at line 1692 of file ffi.cpp.
References Botan::PKCS8::BER_encode(), BOTAN_FFI_DO, BOTAN_PRIVKEY_EXPORT_FLAG_DER, BOTAN_PRIVKEY_EXPORT_FLAG_PEM, and Botan::PKCS8::PEM_encode().
BOTAN_DLL int botan_privkey_export_encrypted | ( | botan_privkey_t | key, |
uint8_t | out[], | ||
size_t * | out_len, | ||
botan_rng_t | rng, | ||
const char * | passphrase, | ||
const char * | encryption_algo, | ||
uint32_t | flags | ||
) |
Definition at line 1704 of file ffi.cpp.
References botan_privkey_export_encrypted_pbkdf_iter().
BOTAN_DLL int botan_privkey_export_encrypted_pbkdf_iter | ( | botan_privkey_t | key, |
uint8_t | out[], | ||
size_t * | out_len, | ||
botan_rng_t | rng, | ||
const char * | passphrase, | ||
size_t | pbkdf_iterations, | ||
const char * | cipher_algo, | ||
const char * | pbkdf_algo, | ||
uint32_t | flags | ||
) |
Definition at line 1757 of file ffi.cpp.
References Botan::PKCS8::BER_encode_encrypted_pbkdf_iter(), BOTAN_FFI_DO, BOTAN_PRIVKEY_EXPORT_FLAG_DER, BOTAN_PRIVKEY_EXPORT_FLAG_PEM, and Botan::PKCS8::PEM_encode_encrypted_pbkdf_iter().
Referenced by botan_privkey_export_encrypted().
BOTAN_DLL int botan_privkey_export_encrypted_pbkdf_msec | ( | botan_privkey_t | key, |
uint8_t | out[], | ||
size_t * | out_len, | ||
botan_rng_t | rng, | ||
const char * | passphrase, | ||
uint32_t | pbkdf_msec_runtime, | ||
size_t * | pbkdf_iterations_out, | ||
const char * | cipher_algo, | ||
const char * | pbkdf_algo, | ||
uint32_t | flags | ||
) |
Definition at line 1714 of file ffi.cpp.
References Botan::PKCS8::BER_encode_encrypted_pbkdf_msec(), BOTAN_FFI_DO, BOTAN_PRIVKEY_EXPORT_FLAG_DER, BOTAN_PRIVKEY_EXPORT_FLAG_PEM, and Botan::PKCS8::PEM_encode_encrypted_pbkdf_msec().
BOTAN_DLL int botan_privkey_export_pubkey | ( | botan_pubkey_t * | out, |
botan_privkey_t | in | ||
) |
Definition at line 1642 of file ffi.cpp.
References Botan::X509::BER_encode(), BOTAN_CURRENT_FUNCTION, BOTAN_FFI_ERROR_EXCEPTION_THROWN, and Botan::X509::load_key().
BOTAN_DLL int botan_privkey_get_field | ( | botan_mp_t | output, |
botan_privkey_t | key, | ||
const char * | field_name | ||
) |
Definition at line 1558 of file ffi.cpp.
References BOTAN_FFI_DO, and BOTAN_FFI_ERROR_NULL_POINTER.
Referenced by botan_privkey_dsa_get_x(), botan_privkey_rsa_get_d(), botan_privkey_rsa_get_e(), botan_privkey_rsa_get_n(), botan_privkey_rsa_get_p(), and botan_privkey_rsa_get_q().
BOTAN_DLL int botan_privkey_load | ( | botan_privkey_t * | key, |
botan_rng_t | rng, | ||
const uint8_t | bits[], | ||
size_t | len, | ||
const char * | password | ||
) |
Definition at line 1270 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, and Botan::PKCS8::load_key().
BOTAN_DLL int botan_privkey_load_dsa | ( | botan_privkey_t * | key, |
botan_mp_t | p, | ||
botan_mp_t | q, | ||
botan_mp_t | g, | ||
botan_mp_t | x | ||
) |
Definition at line 1371 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, and BOTAN_UNUSED.
BOTAN_DLL int botan_privkey_load_rsa | ( | botan_privkey_t * | key, |
botan_mp_t | p, | ||
botan_mp_t | q, | ||
botan_mp_t | d | ||
) |
Definition at line 1326 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, and BOTAN_FFI_ERROR_NOT_IMPLEMENTED.
BOTAN_DLL int botan_privkey_rsa_get_d | ( | botan_mp_t | d, |
botan_privkey_t | rsa_key | ||
) |
Definition at line 1592 of file ffi.cpp.
References botan_privkey_get_field().
BOTAN_DLL int botan_privkey_rsa_get_e | ( | botan_mp_t | e, |
botan_privkey_t | rsa_key | ||
) |
Definition at line 1587 of file ffi.cpp.
References botan_privkey_get_field().
BOTAN_DLL int botan_privkey_rsa_get_n | ( | botan_mp_t | n, |
botan_privkey_t | rsa_key | ||
) |
Definition at line 1582 of file ffi.cpp.
References botan_privkey_get_field().
BOTAN_DLL int botan_privkey_rsa_get_p | ( | botan_mp_t | p, |
botan_privkey_t | rsa_key | ||
) |
Definition at line 1572 of file ffi.cpp.
References botan_privkey_get_field().
BOTAN_DLL int botan_privkey_rsa_get_q | ( | botan_mp_t | q, |
botan_privkey_t | rsa_key | ||
) |
Definition at line 1577 of file ffi.cpp.
References botan_privkey_get_field().
BOTAN_DLL int botan_pubkey_algo_name | ( | botan_pubkey_t | key, |
char | out[], | ||
size_t * | out_len | ||
) |
Definition at line 1660 of file ffi.cpp.
References BOTAN_FFI_DO.
BOTAN_DLL int botan_pubkey_check_key | ( | botan_pubkey_t | key, |
botan_rng_t | rng, | ||
uint32_t | flags | ||
) |
Returns 0 if key is valid, negative if invalid key or some other error
Definition at line 1665 of file ffi.cpp.
References BOTAN_CHECK_KEY_EXPENSIVE_TESTS, and BOTAN_FFI_DO.
BOTAN_DLL int botan_pubkey_destroy | ( | botan_pubkey_t | key | ) |
BOTAN_DLL int botan_pubkey_dsa_get_g | ( | botan_mp_t | d, |
botan_pubkey_t | key | ||
) |
Definition at line 1620 of file ffi.cpp.
References botan_pubkey_get_field().
BOTAN_DLL int botan_pubkey_dsa_get_p | ( | botan_mp_t | p, |
botan_pubkey_t | key | ||
) |
Definition at line 1612 of file ffi.cpp.
References botan_pubkey_get_field().
BOTAN_DLL int botan_pubkey_dsa_get_q | ( | botan_mp_t | q, |
botan_pubkey_t | key | ||
) |
Definition at line 1616 of file ffi.cpp.
References botan_pubkey_get_field().
BOTAN_DLL int botan_pubkey_dsa_get_y | ( | botan_mp_t | y, |
botan_pubkey_t | key | ||
) |
Definition at line 1624 of file ffi.cpp.
References botan_pubkey_get_field().
BOTAN_DLL int botan_pubkey_estimated_strength | ( | botan_pubkey_t | key, |
size_t * | estimate | ||
) |
Definition at line 1798 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::Public_Key::estimated_strength().
BOTAN_DLL int botan_pubkey_export | ( | botan_pubkey_t | key, |
uint8_t | out[], | ||
size_t * | out_len, | ||
uint32_t | flags | ||
) |
Definition at line 1680 of file ffi.cpp.
References Botan::X509::BER_encode(), BOTAN_FFI_DO, BOTAN_PRIVKEY_EXPORT_FLAG_DER, BOTAN_PRIVKEY_EXPORT_FLAG_PEM, and Botan::X509::PEM_encode().
BOTAN_DLL int botan_pubkey_fingerprint | ( | botan_pubkey_t | key, |
const char * | hash, | ||
uint8_t | out[], | ||
size_t * | out_len | ||
) |
Definition at line 1803 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::HashFunction::create().
BOTAN_DLL int botan_pubkey_get_field | ( | botan_mp_t | output, |
botan_pubkey_t | key, | ||
const char * | field_name | ||
) |
Definition at line 1544 of file ffi.cpp.
References BOTAN_FFI_DO, and BOTAN_FFI_ERROR_NULL_POINTER.
Referenced by botan_pubkey_dsa_get_g(), botan_pubkey_dsa_get_p(), botan_pubkey_dsa_get_q(), botan_pubkey_dsa_get_y(), botan_pubkey_rsa_get_e(), and botan_pubkey_rsa_get_n().
BOTAN_DLL int botan_pubkey_load | ( | botan_pubkey_t * | key, |
const uint8_t | bits[], | ||
size_t | len | ||
) |
Definition at line 1302 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, and Botan::X509::load_key().
BOTAN_DLL int botan_pubkey_load_dsa | ( | botan_pubkey_t * | key, |
botan_mp_t | p, | ||
botan_mp_t | q, | ||
botan_mp_t | g, | ||
botan_mp_t | y | ||
) |
Definition at line 1398 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, and BOTAN_UNUSED.
BOTAN_DLL int botan_pubkey_load_rsa | ( | botan_pubkey_t * | key, |
botan_mp_t | n, | ||
botan_mp_t | e | ||
) |
Definition at line 1349 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, and BOTAN_FFI_ERROR_NOT_IMPLEMENTED.
BOTAN_DLL int botan_pubkey_rsa_get_e | ( | botan_mp_t | e, |
botan_pubkey_t | rsa_key | ||
) |
Definition at line 1597 of file ffi.cpp.
References botan_pubkey_get_field().
BOTAN_DLL int botan_pubkey_rsa_get_n | ( | botan_mp_t | n, |
botan_pubkey_t | rsa_key | ||
) |
Definition at line 1602 of file ffi.cpp.
References botan_pubkey_get_field().
BOTAN_DLL int botan_rng_destroy | ( | botan_rng_t | rng | ) |
BOTAN_DLL int botan_rng_get | ( | botan_rng_t | rng, |
uint8_t * | out, | ||
size_t | out_len | ||
) |
Get random bytes from a random number generator
rng | rng object |
out | output buffer of size out_len |
out_len | number of requested bytes |
TODO: better name
Definition at line 331 of file ffi.cpp.
References BOTAN_FFI_DO, and Botan::RandomNumberGenerator::randomize().
BOTAN_DLL int botan_rng_init | ( | botan_rng_t * | rng, |
const char * | rng_type | ||
) |
Initialize a random number generator object
rng | rng object |
rng_type | type of the rng, possible values: "system": System_RNG, "user": AutoSeeded_RNG Set rng_type to null or empty string to let the library choose |
TODO: replace rng_type with simple flags?
Definition at line 289 of file ffi.cpp.
References BOTAN_ASSERT_ARG_NON_NULL, and BOTAN_CURRENT_FUNCTION.
BOTAN_DLL int botan_rng_reseed | ( | botan_rng_t | rng, |
size_t | bits | ||
) |
Reseed a random number generator Uses the System_RNG as a seed generator.
rng | rng object |
bits | number of bits to to reseed with |
Definition at line 336 of file ffi.cpp.
References BOTAN_FFI_DO, Botan::RandomNumberGenerator::reseed_from_rng(), and Botan::system_rng().
BOTAN_DLL int botan_same_mem | ( | const uint8_t * | x, |
const uint8_t * | y, | ||
size_t | len | ||
) |
Returns 0 if x[0..len] == y[0..len], or otherwise -1
Definition at line 268 of file ffi.cpp.
References Botan::same_mem().
BOTAN_DLL uint32_t botan_version_datestamp | ( | ) |
Return the date this version was released as an integer, or 0 if an unreleased version
Definition at line 266 of file ffi.cpp.
References Botan::version_datestamp().
BOTAN_DLL uint32_t botan_version_major | ( | ) |
Return the major version of the library
Definition at line 263 of file ffi.cpp.
References Botan::version_major().
BOTAN_DLL uint32_t botan_version_minor | ( | ) |
Return the minor version of the library
Definition at line 264 of file ffi.cpp.
References Botan::version_minor().
BOTAN_DLL uint32_t botan_version_patch | ( | ) |
Return the patch version of the library
Definition at line 265 of file ffi.cpp.
References Botan::version_patch().
BOTAN_DLL const char* botan_version_string | ( | ) |
Return a free-form version string, e.g., 2.0.0
Definition at line 258 of file ffi.cpp.
References Botan::version_cstr().
BOTAN_DLL int botan_x509_cert_allowed_usage | ( | botan_x509_cert_t | cert, |
unsigned int | key_usage | ||
) |
BOTAN_DLL int botan_x509_cert_destroy | ( | botan_x509_cert_t | cert | ) |
BOTAN_DLL int botan_x509_cert_gen_selfsigned | ( | botan_x509_cert_t * | cert, |
botan_privkey_t | key, | ||
botan_rng_t | rng, | ||
const char * | common_name, | ||
const char * | org_name | ||
) |
BOTAN_DLL int botan_x509_cert_get_authority_key_id | ( | botan_x509_cert_t | cert, |
uint8_t | out[], | ||
size_t * | out_len | ||
) |
Definition at line 2132 of file ffi.cpp.
References BOTAN_FFI_DO.
BOTAN_DLL int botan_x509_cert_get_fingerprint | ( | botan_x509_cert_t | cert, |
const char * | hash, | ||
uint8_t | out[], | ||
size_t * | out_len | ||
) |
Definition at line 2127 of file ffi.cpp.
References BOTAN_FFI_DO.
BOTAN_DLL int botan_x509_cert_get_issuer_dn | ( | botan_x509_cert_t | cert, |
const char * | key, | ||
size_t | index, | ||
uint8_t | out[], | ||
size_t * | out_len | ||
) |
Definition at line 2179 of file ffi.cpp.
References BOTAN_FFI_DO.
BOTAN_DLL int botan_x509_cert_get_public_key | ( | botan_x509_cert_t | cert, |
botan_pubkey_t * | key | ||
) |
Definition at line 2154 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, BOTAN_FFI_ERROR_EXCEPTION_THROWN, and BOTAN_FFI_ERROR_NOT_IMPLEMENTED.
BOTAN_DLL int botan_x509_cert_get_public_key_bits | ( | botan_x509_cert_t | cert, |
uint8_t | out[], | ||
size_t * | out_len | ||
) |
Definition at line 2142 of file ffi.cpp.
References BOTAN_FFI_DO.
BOTAN_DLL int botan_x509_cert_get_serial_number | ( | botan_x509_cert_t | cert, |
uint8_t | out[], | ||
size_t * | out_len | ||
) |
Definition at line 2122 of file ffi.cpp.
References BOTAN_FFI_DO.
BOTAN_DLL int botan_x509_cert_get_subject_dn | ( | botan_x509_cert_t | cert, |
const char * | key, | ||
size_t | index, | ||
uint8_t | out[], | ||
size_t * | out_len | ||
) |
Definition at line 2186 of file ffi.cpp.
References BOTAN_FFI_DO.
BOTAN_DLL int botan_x509_cert_get_subject_key_id | ( | botan_x509_cert_t | cert, |
uint8_t | out[], | ||
size_t * | out_len | ||
) |
Definition at line 2137 of file ffi.cpp.
References BOTAN_FFI_DO.
BOTAN_DLL int botan_x509_cert_get_time_expires | ( | botan_x509_cert_t | cert, |
char | out[], | ||
size_t * | out_len | ||
) |
Definition at line 2117 of file ffi.cpp.
References BOTAN_FFI_DO.
BOTAN_DLL int botan_x509_cert_get_time_starts | ( | botan_x509_cert_t | cert, |
char | out[], | ||
size_t * | out_len | ||
) |
Definition at line 2112 of file ffi.cpp.
References BOTAN_FFI_DO.
BOTAN_DLL int botan_x509_cert_load | ( | botan_x509_cert_t * | cert_obj, |
const uint8_t | cert[], | ||
size_t | cert_len | ||
) |
Definition at line 2076 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION.
BOTAN_DLL int botan_x509_cert_load_file | ( | botan_x509_cert_t * | cert_obj, |
const char * | filename | ||
) |
Definition at line 2045 of file ffi.cpp.
References BOTAN_CURRENT_FUNCTION, and BOTAN_FFI_ERROR_NOT_IMPLEMENTED.
BOTAN_DLL int botan_x509_cert_path_verify | ( | botan_x509_cert_t | cert, |
const char * | ca_dir | ||
) |
BOTAN_DLL int botan_x509_cert_to_string | ( | botan_x509_cert_t | cert, |
char | out[], | ||
size_t * | out_len | ||
) |
Definition at line 2193 of file ffi.cpp.
References BOTAN_FFI_DO.