34 #ifndef HAD_ZIP_CRYPTO_GNUTLS_H
35 #define HAD_ZIP_CRYPTO_GNUTLS_H
37 #define HAVE_SECURE_RANDOM
40 #include <nettle/pbkdf2.h>
42 #include <gnutls/gnutls.h>
44 #include <gnutls/crypto.h>
55 #define _zip_crypto_hmac_t gnutls_hmac_hd_t
61 #define _zip_crypto_hmac(hmac, data, length) (gnutls_hmac(*(hmac), (data), (length)) == 0)
64 #define _zip_crypto_hmac_output(hmac, data) (gnutls_hmac_output(*(hmac), (data)), true)
66 #define _zip_crypto_pbkdf2(key, key_length, salt, salt_length, iterations, output, output_length) (pbkdf2_hmac_sha1((key_length), (key), (iterations), (salt_length), (salt), (output_length), (output)), true)
const lzma_allocator const uint8_t * in
const lzma_allocator const uint8_t size_t uint8_t * out
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len key
void error(const char *msg)
bool _zip_crypto_aes_encrypt_block(_zip_crypto_aes_t *aes, const zip_uint8_t *in, zip_uint8_t *out)
void _zip_crypto_hmac_free(_zip_crypto_hmac_t *hmac)
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)
_zip_crypto_hmac_t * _zip_crypto_hmac_new(const zip_uint8_t *secret, zip_uint64_t secret_length, zip_error_t *error)
struct _zip_crypto_aes_s _zip_crypto_aes_t