From e0b23f941efd7412640cebe71a82a7df170388b2 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 24 Apr 2017 11:28:32 +0200 Subject: Use namespace for AES crypto code. --- include/mupdf/fitz/crypt.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/mupdf/fitz/crypt.h b/include/mupdf/fitz/crypt.h index bce16a90..96be7375 100644 --- a/include/mupdf/fitz/crypt.h +++ b/include/mupdf/fitz/crypt.h @@ -102,8 +102,8 @@ void fz_arc4_encrypt(fz_arc4 *state, unsigned char *dest, const unsigned char *s typedef struct fz_aes_s fz_aes; -#define AES_DECRYPT 0 -#define AES_ENCRYPT 1 +#define FZ_AES_DECRYPT 0 +#define FZ_AES_ENCRYPT 1 /* Structure definition is public to enable stack @@ -116,9 +116,9 @@ struct fz_aes_s unsigned long buf[68]; /* unaligned data */ }; -int aes_setkey_enc( fz_aes *ctx, const unsigned char *key, int keysize ); -int aes_setkey_dec( fz_aes *ctx, const unsigned char *key, int keysize ); -void aes_crypt_cbc( fz_aes *ctx, int mode, size_t length, +int fz_aes_setkey_enc( fz_aes *ctx, const unsigned char *key, int keysize ); +int fz_aes_setkey_dec( fz_aes *ctx, const unsigned char *key, int keysize ); +void fz_aes_crypt_cbc( fz_aes *ctx, int mode, size_t length, unsigned char iv[16], const unsigned char *input, unsigned char *output ); -- cgit v1.2.3