diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:22:48 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:22:48 -0700 |
commit | f81ba93d4a7e43fccf4730e5e7404ee765a76e3e (patch) | |
tree | 1f130d999e06b2d572bce1f99eaeaadd329a7ae7 /contrib/minizip/crypt.h | |
parent | 4b5a43a219d51066c01ff2ab86af18b967f2d0dd (diff) | |
download | zlib-1.2.0.6.tar.gz zlib-1.2.0.6.tar.bz2 zlib-1.2.0.6.zip |
zlib 1.2.0.6v1.2.0.6
Diffstat (limited to 'contrib/minizip/crypt.h')
-rw-r--r-- | contrib/minizip/crypt.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/contrib/minizip/crypt.h b/contrib/minizip/crypt.h index a02bf0b..9c7a89c 100644 --- a/contrib/minizip/crypt.h +++ b/contrib/minizip/crypt.h | |||
@@ -1,3 +1,31 @@ | |||
1 | /* crypt.h -- base code for crypt/uncrypt ZIPfile | ||
2 | |||
3 | |||
4 | Version 1.00, September 10th, 2003 | ||
5 | |||
6 | Copyright (C) 1998-2003 Gilles Vollant | ||
7 | |||
8 | This code is a modified version of crypting code in Infozip distribution | ||
9 | |||
10 | The encryption/decryption parts of this source code (as opposed to the | ||
11 | non-echoing password parts) were originally written in Europe. The | ||
12 | whole source package can be freely distributed, including from the USA. | ||
13 | (Prior to January 2000, re-export from the US was a violation of US law.) | ||
14 | |||
15 | This encryption code is a direct transcription of the algorithm from | ||
16 | Roger Schlafly, described by Phil Katz in the file appnote.txt. This | ||
17 | file (appnote.txt) is distributed with the PKZIP program (even in the | ||
18 | version without encryption capabilities). | ||
19 | |||
20 | If you don't need crypting in your application, just define symbols | ||
21 | NOCRYPT and NOUNCRYPT. | ||
22 | |||
23 | This code support the "Traditional PKWARE Encryption". | ||
24 | |||
25 | The new AES encryption added on Zip format by Winzip (see the page | ||
26 | http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong | ||
27 | Encryption is not supported. | ||
28 | */ | ||
1 | 29 | ||
2 | #define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8)) | 30 | #define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8)) |
3 | 31 | ||