From b230cf3aa24f3883b8b165bd5fd56620a9a95e47 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sun, 8 Mar 2015 19:07:42 +0100 Subject: Update quazip to release 0.7.1. Update to latest quazip release. Note that quazip is now LGPL and not GPL / LGPL dual licensed anymore. Change-Id: Ie1e975b5b546dd31218eef9df472527493fe81e0 --- rbutil/rbutilqt/quazip/crypt.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'rbutil/rbutilqt/quazip/crypt.h') diff --git a/rbutil/rbutilqt/quazip/crypt.h b/rbutil/rbutilqt/quazip/crypt.h index 359cf6726e..ddee28e7dd 100644 --- a/rbutil/rbutilqt/quazip/crypt.h +++ b/rbutil/rbutilqt/quazip/crypt.h @@ -27,17 +27,19 @@ Encryption is not supported. */ +#include "quazip_global.h" + #define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8)) /*********************************************************************** * Return the next byte in the pseudo-random sequence */ -static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab) +static int decrypt_byte(unsigned long* pkeys, const z_crc_t FAR * pcrc_32_tab UNUSED) { + //(void) pcrc_32_tab; /* avoid "unused parameter" warning */ unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an * unpredictable manner on 16-bit systems; not a problem * with any known compiler so far, though */ - (void) pcrc_32_tab; /* avoid "unused parameter" warning */ temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2; return (int)(((temp * (temp ^ 1)) >> 8) & 0xff); @@ -46,7 +48,7 @@ static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab) /*********************************************************************** * Update the encryption keys with the next byte of plain text */ -static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c) +static int update_keys(unsigned long* pkeys,const z_crc_t FAR * pcrc_32_tab,int c) { (*(pkeys+0)) = CRC32((*(pkeys+0)), c); (*(pkeys+1)) += (*(pkeys+0)) & 0xff; @@ -63,7 +65,7 @@ static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int * Initialize the encryption keys and the random header according to * the given password. */ -static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab) +static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t FAR * pcrc_32_tab) { *(pkeys+0) = 305419896L; *(pkeys+1) = 591751049L; @@ -93,7 +95,7 @@ static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting) unsigned char *buf; /* where to write header */ int bufSize; unsigned long* pkeys; - const unsigned long* pcrc_32_tab; + const z_crc_t FAR * pcrc_32_tab; unsigned long crcForCrypting; { int n; /* index in random header */ -- cgit v1.2.3