Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Macros | |
#define | HAVE_SECURE_RANDOM |
Typedefs | |
typedef struct _zip_crypto_aes_s | _zip_crypto_aes_t |
typedef struct _zip_crypto_hmac_s | _zip_crypto_hmac_t |
Functions | |
void | _zip_crypto_aes_free (_zip_crypto_aes_t *aes) |
_zip_crypto_aes_t * | _zip_crypto_aes_new (const zip_uint8_t *key, zip_uint16_t key_size, zip_error_t *error) |
bool | _zip_crypto_aes_encrypt_block (_zip_crypto_aes_t *aes, const zip_uint8_t *in, zip_uint8_t *out) |
bool | _zip_crypto_pbkdf2 (const zip_uint8_t *key, zip_uint64_t key_length, const zip_uint8_t *salt, zip_uint16_t salt_length, zip_uint16_t iterations, zip_uint8_t *output, zip_uint16_t output_length) |
_zip_crypto_hmac_t * | _zip_crypto_hmac_new (const zip_uint8_t *secret, zip_uint64_t secret_length, zip_error_t *error) |
void | _zip_crypto_hmac_free (_zip_crypto_hmac_t *hmac) |
bool | _zip_crypto_hmac (_zip_crypto_hmac_t *hmac, zip_uint8_t *data, zip_uint64_t length) |
bool | _zip_crypto_hmac_output (_zip_crypto_hmac_t *hmac, zip_uint8_t *data) |
#define HAVE_SECURE_RANDOM |
Definition at line 37 of file zip_crypto_win.h.
typedef struct _zip_crypto_aes_s _zip_crypto_aes_t |
Definition at line 1 of file zip_crypto_win.h.
typedef struct _zip_crypto_hmac_s _zip_crypto_hmac_t |
Definition at line 1 of file zip_crypto_win.h.
bool _zip_crypto_aes_encrypt_block | ( | _zip_crypto_aes_t * | aes, |
const zip_uint8_t * | in, | ||
zip_uint8_t * | out | ||
) |
Definition at line 54 of file zip_crypto_commoncrypto.c.
References _zip_crypto_aes_t::ctx, _zip_crypto_aes_t::ctx_128, _zip_crypto_aes_t::ctx_192, _zip_crypto_aes_t::ctx_256, in, _zip_crypto_aes_t::key_size, len, nettle_aes128_encrypt(), nettle_aes192_encrypt(), nettle_aes256_encrypt(), NULL, out, status, ULONG, and ZIP_CRYPTO_AES_BLOCK_LENGTH.
void _zip_crypto_aes_free | ( | _zip_crypto_aes_t * | aes | ) |
Definition at line 44 of file zip_crypto_commoncrypto.c.
References _zip_crypto_clear, free(), and NULL.
Referenced by _zip_crypto_aes_new(), _zip_winzip_aes_free(), and _zip_winzip_aes_new().
_zip_crypto_aes_t* _zip_crypto_aes_new | ( | const zip_uint8_t * | key, |
zip_uint16_t | key_size, | ||
zip_error_t * | error | ||
) |
Definition at line 62 of file zip_crypto_commoncrypto.c.
References _zip_crypto_aes_free(), calloc(), _zip_crypto_aes_t::ctx, _zip_crypto_aes_t::ctx_128, _zip_crypto_aes_t::ctx_192, _zip_crypto_aes_t::ctx_256, error(), free(), key, _zip_crypto_aes_t::key_size, malloc(), memset(), nettle_aes128_set_encrypt_key(), nettle_aes192_set_encrypt_key(), nettle_aes256_set_encrypt_key(), NULL, ULONG, ZIP_ER_INTERNAL, ZIP_ER_INVAL, ZIP_ER_MEMORY, and zip_error_set().
Referenced by _zip_winzip_aes_new().
bool _zip_crypto_hmac | ( | _zip_crypto_hmac_t * | hmac, |
zip_uint8_t * | data, | ||
zip_uint64_t | length | ||
) |
Definition at line 475 of file zip_crypto_win.c.
References _zip_crypto_hmac_s::hHash, length, NULL, and ULONG.
void _zip_crypto_hmac_free | ( | _zip_crypto_hmac_t * | hmac | ) |
Definition at line 88 of file zip_crypto_commoncrypto.c.
References _zip_crypto_clear, free(), _zip_crypto_hmac_s::hAlgorithm, _zip_crypto_hmac_s::hHash, NULL, _zip_crypto_hmac_s::pbHash, _zip_crypto_hmac_s::pbHashObject, and ZIP_CRYPTO_SHA1_LENGTH.
Referenced by _zip_crypto_hmac_new(), and _zip_winzip_aes_free().
_zip_crypto_hmac_t* _zip_crypto_hmac_new | ( | const zip_uint8_t * | secret, |
zip_uint64_t | secret_length, | ||
zip_error_t * | error | ||
) |
Definition at line 99 of file zip_crypto_commoncrypto.c.
References _zip_crypto_hmac_free(), calloc(), _zip_crypto_hmac_s::cbHash, _zip_crypto_hmac_s::cbHashObject, error(), free(), _zip_crypto_hmac_s::hAlgorithm, _zip_crypto_hmac_s::hHash, INT_MAX, malloc(), NULL, _zip_crypto_hmac_s::pbHash, _zip_crypto_hmac_s::pbHashObject, status, ULONG, ZIP_ER_INTERNAL, ZIP_ER_INVAL, ZIP_ER_MEMORY, and zip_error_set().
Referenced by _zip_winzip_aes_new().
bool _zip_crypto_hmac_output | ( | _zip_crypto_hmac_t * | hmac, |
zip_uint8_t * | data | ||
) |
Definition at line 174 of file zip_crypto_openssl.c.
References _zip_crypto_hmac_s::cbHash, _zip_crypto_hmac_s::hHash, length, and NULL.
bool _zip_crypto_pbkdf2 | ( | const zip_uint8_t * | key, |
zip_uint64_t | key_length, | ||
const zip_uint8_t * | salt, | ||
zip_uint16_t | salt_length, | ||
zip_uint16_t | iterations, | ||
zip_uint8_t * | output, | ||
zip_uint16_t | output_length | ||
) |
Definition at line 91 of file zip_crypto_win.c.