diff options
Diffstat (limited to 'utils/themeeditor/quazip/crypt.h')
-rw-r--r-- | utils/themeeditor/quazip/crypt.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/themeeditor/quazip/crypt.h b/utils/themeeditor/quazip/crypt.h index 82748c5715..2316f0c604 100644 --- a/utils/themeeditor/quazip/crypt.h +++ b/utils/themeeditor/quazip/crypt.h | |||
@@ -32,7 +32,7 @@ | |||
32 | /*********************************************************************** | 32 | /*********************************************************************** |
33 | * Return the next byte in the pseudo-random sequence | 33 | * Return the next byte in the pseudo-random sequence |
34 | */ | 34 | */ |
35 | static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab) | 35 | static int decrypt_byte(unsigned long* pkeys, const uint32_t* pcrc_32_tab) |
36 | { | 36 | { |
37 | (void) pcrc_32_tab; /* avoid "unused parameter" warning */ | 37 | (void) pcrc_32_tab; /* avoid "unused parameter" warning */ |
38 | unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an | 38 | unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an |
@@ -46,7 +46,7 @@ static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab) | |||
46 | /*********************************************************************** | 46 | /*********************************************************************** |
47 | * Update the encryption keys with the next byte of plain text | 47 | * Update the encryption keys with the next byte of plain text |
48 | */ | 48 | */ |
49 | static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c) | 49 | static int update_keys(unsigned long* pkeys,const uint32_t* pcrc_32_tab,int c) |
50 | { | 50 | { |
51 | (*(pkeys+0)) = CRC32((*(pkeys+0)), c); | 51 | (*(pkeys+0)) = CRC32((*(pkeys+0)), c); |
52 | (*(pkeys+1)) += (*(pkeys+0)) & 0xff; | 52 | (*(pkeys+1)) += (*(pkeys+0)) & 0xff; |
@@ -63,7 +63,7 @@ static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int | |||
63 | * Initialize the encryption keys and the random header according to | 63 | * Initialize the encryption keys and the random header according to |
64 | * the given password. | 64 | * the given password. |
65 | */ | 65 | */ |
66 | static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab) | 66 | static void init_keys(const char* passwd,unsigned long* pkeys,const uint32_t* pcrc_32_tab) |
67 | { | 67 | { |
68 | *(pkeys+0) = 305419896L; | 68 | *(pkeys+0) = 305419896L; |
69 | *(pkeys+1) = 591751049L; | 69 | *(pkeys+1) = 591751049L; |
@@ -93,7 +93,7 @@ static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting) | |||
93 | unsigned char *buf; /* where to write header */ | 93 | unsigned char *buf; /* where to write header */ |
94 | int bufSize; | 94 | int bufSize; |
95 | unsigned long* pkeys; | 95 | unsigned long* pkeys; |
96 | const unsigned long* pcrc_32_tab; | 96 | const uint32_t* pcrc_32_tab; |
97 | unsigned long crcForCrypting; | 97 | unsigned long crcForCrypting; |
98 | { | 98 | { |
99 | int n; /* index in random header */ | 99 | int n; /* index in random header */ |