Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Macros | |
#define | RZ_CRYPTO_OUTPUT_SIZE 4096 |
Functions | |
RZ_LIB_VERSION (rz_crypto) | |
RZ_API const char * | rz_crypto_name (const RzCryptoSelector bit) |
RZ_API const char * | rz_crypto_codec_name (const RzCryptoSelector bit) |
RZ_API const RzCryptoPlugin * | rz_crypto_plugin_by_index (size_t index) |
RZ_API int | rz_crypto_add (RzCrypto *cry, RzCryptoPlugin *h) |
RZ_API int | rz_crypto_del (RzCrypto *cry, RzCryptoPlugin *h) |
RZ_API RzCrypto * | rz_crypto_new (void) |
RZ_API void | rz_crypto_free (RzCrypto *cry) |
RZ_API bool | rz_crypto_use (RzCrypto *cry, const char *algo) |
RZ_API bool | rz_crypto_set_key (RzCrypto *cry, const ut8 *key, int keylen, int mode, int direction) |
RZ_API bool | rz_crypto_set_iv (RzCrypto *cry, const ut8 *iv, int ivlen) |
RZ_API int | rz_crypto_update (RzCrypto *cry, const ut8 *buf, int len) |
RZ_API int | rz_crypto_final (RzCrypto *cry, const ut8 *buf, int len) |
RZ_API int | rz_crypto_append (RzCrypto *cry, const ut8 *buf, int len) |
RZ_API const ut8 * | rz_crypto_get_output (RzCrypto *cry, int *size) |
Variables | |
static RzCryptoPlugin * | crypto_static_plugins [] = { RZ_CRYPTO_STATIC_PLUGINS } |
struct { | |
const char * name | |
RzCryptoSelector bit | |
} | crypto_name_bytes [] |
struct { | |
const char * name | |
RzCryptoSelector bit | |
} | codec_name_bytes [] |
RZ_API int rz_crypto_add | ( | RzCrypto * | cry, |
RzCryptoPlugin * | h | ||
) |
Definition at line 72 of file crypto.c.
References h, rz_crypto_t::plugins, and rz_list_append().
Referenced by rz_crypto_new().
Definition at line 175 of file crypto.c.
References len, memcpy(), rz_crypto_t::output, rz_crypto_t::output_len, rz_crypto_t::output_size, realloc(), and rz_warn_if_reached.
Referenced by update().
RZ_API const char* rz_crypto_codec_name | ( | const RzCryptoSelector | bit | ) |
Definition at line 54 of file crypto.c.
References bit, codec_name_bytes, i, and RZ_ARRAY_SIZE.
RZ_API int rz_crypto_del | ( | RzCrypto * | cry, |
RzCryptoPlugin * | h | ||
) |
Definition at line 78 of file crypto.c.
References h, rz_crypto_t::plugins, and rz_list_delete_data().
Definition at line 170 of file crypto.c.
References rz_crypto_plugin_t::final, rz_crypto_t::h, and len.
Referenced by _decrypt(), _encrypt(), calculate_decrypt(), calculate_encrypt(), and encrypt_or_decrypt_block().
Definition at line 116 of file crypto.c.
References rz_crypto_plugin_t::fini, free(), rz_crypto_t::h, rz_crypto_t::iv, rz_crypto_t::key, rz_crypto_plugin_t::name, rz_crypto_t::output, rz_crypto_t::plugins, rz_list_free(), and RZ_LOG_ERROR.
Referenced by _decrypt(), _encrypt(), calculate_decrypt(), calculate_encrypt(), encrypt_or_decrypt_block(), and rz_crypto_new().
Definition at line 193 of file crypto.c.
References NULL, rz_crypto_t::output, rz_crypto_t::output_len, and rz_crypto_t::output_size.
Referenced by _decrypt(), _encrypt(), calculate_decrypt(), calculate_encrypt(), and encrypt_or_decrypt_block().
RZ_API const char* rz_crypto_name | ( | const RzCryptoSelector | bit | ) |
Definition at line 44 of file crypto.c.
References bit, crypto_name_bytes, i, and RZ_ARRAY_SIZE.
Definition at line 83 of file crypto.c.
References crypto_static_plugins, free(), i, malloc(), memcpy(), NULL, rz_crypto_t::output, rz_crypto_t::output_size, p, rz_crypto_t::plugins, RZ_ARRAY_SIZE, rz_crypto_add(), rz_crypto_free(), RZ_CRYPTO_OUTPUT_SIZE, rz_list_newf(), RZ_LOG_ERROR, and RZ_NEW0.
Referenced by _decrypt(), _encrypt(), calculate_decrypt(), calculate_encrypt(), and encrypt_or_decrypt_block().
RZ_API const RzCryptoPlugin* rz_crypto_plugin_by_index | ( | size_t | index | ) |
Definition at line 64 of file crypto.c.
References crypto_static_plugins, NULL, and RZ_ARRAY_SIZE.
Referenced by rz_hash_show_algorithms().
Definition at line 161 of file crypto.c.
References rz_crypto_t::h, and rz_crypto_plugin_t::set_iv.
Referenced by _decrypt(), _encrypt(), calculate_decrypt(), calculate_encrypt(), and encrypt_or_decrypt_block().
RZ_API bool rz_crypto_set_key | ( | RzCrypto * | cry, |
const ut8 * | key, | ||
int | keylen, | ||
int | mode, | ||
int | direction | ||
) |
Definition at line 151 of file crypto.c.
References rz_crypto_t::h, key, and rz_crypto_plugin_t::set_key.
Referenced by _decrypt(), _encrypt(), calculate_decrypt(), calculate_encrypt(), and encrypt_or_decrypt_block().
Definition at line 166 of file crypto.c.
References rz_crypto_t::h, len, and rz_crypto_plugin_t::update.
Referenced by calculate_decrypt(), calculate_encrypt(), and encrypt_or_decrypt_block().
Definition at line 130 of file crypto.c.
References rz_crypto_plugin_t::fini, rz_crypto_t::h, h, rz_crypto_plugin_t::name, rz_crypto_t::plugins, RZ_LOG_ERROR, and rz_warn_if_fail.
Referenced by _decrypt(), _encrypt(), calculate_decrypt(), calculate_encrypt(), and encrypt_or_decrypt_block().
RZ_LIB_VERSION | ( | rz_crypto | ) |
RzCryptoSelector bit |
Definition at line 16 of file crypto.c.
Referenced by address_bit(), analop_esil(), avr_il_bld(), avr_il_bst(), avr_il_check_carry_flag_subtraction(), avr_il_check_half_carry_flag_addition(), avr_il_check_half_carry_flag_subtraction(), avr_il_set_sreg_bit_from_reg(), avr_il_sreg_bit_as_imm(), been_here(), bin_pe_init_sections(), bitmapClearBit(), bitmapSetBit(), bitmapTestBit(), clusterGenNodeDescription(), clusterReplyMultiBulkSlots(), es_add_ck(), es_sign_n_64(), esil_bf(), esil_cf(), esil_of(), esil_sign_extend(), find_block_at_xref_addr(), get_literal_price(), literal_matched(), print_insn_sparc(), rc_bit(), rc_bit_price(), rc_bittree(), rc_bittree_price(), rc_bittree_reverse(), rc_bittree_reverse_price(), rd_character(), rz_analysis_block_automerge(), rz_bitmap_set(), rz_bitmap_test(), rz_bitmap_unset(), rz_bv_set_from_bytes_be(), rz_bv_set_from_bytes_le(), rz_core_visual_bit_editor(), rz_crypto_codec_name(), rz_crypto_name(), rz_num_to_bits(), rz_reg_set_value(), rz_str_bits(), rz_str_bits64(), rz_str_bits_from_string(), sh_il_get_status_reg_bit(), sign_extend(), and writebit().
const { ... } codec_name_bytes[] |
Referenced by rz_crypto_codec_name().
const { ... } crypto_name_bytes[] |
Referenced by rz_crypto_name().
|
static |
Definition at line 12 of file crypto.c.
Referenced by rz_crypto_new(), and rz_crypto_plugin_by_index().