aboutsummaryrefslogtreecommitdiff
path: root/contrib/minizip/crypt.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/minizip/crypt.h')
-rw-r--r--contrib/minizip/crypt.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/contrib/minizip/crypt.h b/contrib/minizip/crypt.h
index 131543f..9da1537 100644
--- a/contrib/minizip/crypt.h
+++ b/contrib/minizip/crypt.h
@@ -78,24 +78,24 @@ static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t* pcr
78 (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab))) 78 (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab)))
79 79
80#define zencode(pkeys,pcrc_32_tab,c,t) \ 80#define zencode(pkeys,pcrc_32_tab,c,t) \
81 (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c)) 81 (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), (Byte)t^(c))
82 82
83#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED 83#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED
84 84
85#define RAND_HEAD_LEN 12 85#define RAND_HEAD_LEN 12
86 /* "last resort" source for second part of crypt seed pattern */ 86 /* "last resort" source for second part of crypt seed pattern */
87# ifndef ZCR_SEED2 87# ifndef ZCR_SEED2
88# define ZCR_SEED2 3141592654UL /* use PI as default pattern */ 88# define ZCR_SEED2 3141592654L /* use PI as default pattern */
89# endif 89# endif
90 90
91static int crypthead(const char* passwd, /* password string */ 91static unsigned crypthead(const char* passwd, /* password string */
92 unsigned char* buf, /* where to write header */ 92 unsigned char* buf, /* where to write header */
93 int bufSize, 93 int bufSize,
94 unsigned long* pkeys, 94 unsigned long* pkeys,
95 const z_crc_t* pcrc_32_tab, 95 const z_crc_t* pcrc_32_tab,
96 unsigned long crcForCrypting) 96 unsigned long crcForCrypting)
97{ 97{
98 int n; /* index in random header */ 98 unsigned n; /* index in random header */
99 int t; /* temporary */ 99 int t; /* temporary */
100 int c; /* random byte */ 100 int c; /* random byte */
101 unsigned char header[RAND_HEAD_LEN-2]; /* random header */ 101 unsigned char header[RAND_HEAD_LEN-2]; /* random header */