home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1999 February
/
VPR9902A.BIN
/
OLS
/
zcryd001
/
zcryd001.lzh
/
SRC
/
CRYPT.H
< prev
next >
Wrap
C/C++ Source or Header
|
1998-06-02
|
3KB
|
133 lines
/*
crypt.h (dummy version) by Info-ZIP. Last revised: 5 Oct 97
This is a non-functional version of Info-ZIP's crypt.h encryption/
decryption header file for Zip, ZipCloak, UnZip and fUnZip. This
file is not copyrighted and may be distributed without restriction.
See the "WHERE" file for sites from which to obtain the full crypt
sources (zcrypt27.zip or later).
*/
/*
crypt.h (full version) by Info-ZIP. Last revised: [see CR_VERSION_DATE]
This header file is not copyrighted, and non-beta versions may be
distributed without restriction.
*/
#ifndef __crypt_h /* don't include more than once */
#define __crypt_h
#ifdef CRYPT
# undef CRYPT
# define CRYPT 1 /* dummy version */
#else
# define CRYPT 0 /* dummy version */
#endif
#if !CRYPT
# define zencode
# define zdecode
# define zfwrite fwrite
#else /* !CRYPT */
#ifdef WINDLL
# include <windows.h>
# define DLLIMPORT(FUNC) (WINAPI *FUNC)
#elif defined(_WIN32)
# include <windows.h>
# define DLLIMPORT(FUNC) WINAPI FUNC
#else
# define DLLIMPORT(FUNC) FUNC
#endif
void DLLIMPORT(zencode_n)(char *ptr,int n);
int DLLIMPORT(zencode)(char c,int *t);
#define CR_MAJORVER 2
#define CR_MINORVER 7
#ifdef CR_BETA
# define CR_BETA_VER "m BETA"
# define CR_VERSION_DATE "13 April 1997" /* last real code change */
#else
# define CR_BETA_VER ""
# define CR_VERSION_DATE "22 April 1997" /* last public release date */
# define CR_RELEASE
#endif
#ifndef __G /* UnZip only, for now (DLL stuff) */
# define __G
# define __G__
# define __GDEF
# define __GPRO void
# define __GPRO__
#endif
#if defined(MSDOS) || defined(OS2) || defined(WIN32)
# ifndef DOS_OS2_W32
# define DOS_OS2_W32
# endif
#endif
#if defined(DOS_OS2_W32) || defined(__human68k__)
# ifndef DOS_H68_OS2_W32
# define DOS_H68_OS2_W32
# endif
#endif
#if defined(VM_CMS) || defined(MVS)
# ifndef CMS_MVS
# define CMS_MVS
# endif
#endif
#ifdef REALLY_SHORT_SYMS
# define decrypt_byte dcrbyt
#endif
#define PWLEN 80 /* input buffer size for reading encryption key */
#define RAND_HEAD_LEN 12 /* length of encryption random header */
/* the crc_32_tab array has to be provided externally for the crypt calculus */
#ifndef UNZIP /* UnZip provides this in globals.h */
extern ulg near *crc_32_tab;
#ifdef WINDLL
void DLLIMPORT(zcrypt_set_crc_32_tab) OF((ulg near *));
#endif
#endif /* !UNZIP */
int DLLIMPORT(decrypt_byte) OF((__GPRO));
int DLLIMPORT(update_keys) OF((__GPRO__ int c));
void DLLIMPORT(init_keys) OF((__GPRO__ char *passwd));
#ifdef ZIP
void DLLIMPORT(crypthead) OF((char *, ulg, FILE *));
# ifdef UTIL
int DLLIMPORT(zipcloak) OF((struct zlist far *, FILE *, FILE *, char *));
int DLLIMPORT(zipbare) OF((__GPRO__ struct zlist far *, FILE *, FILE *, char *));
# else
unsigned DLLIMPORT(zfwrite) OF((zvoid *, extent, extent, FILE *));
extern char *key;
#ifdef WINDLL
void DLLIMPORT(zcrypt_set_key) OF((char *));
#endif
# endif
#endif /* ZIP */
#if (defined(UNZIP) && !defined(FUNZIP))
int decrypt OF((__GPRO));
#endif
#ifdef FUNZIP
extern int encrypted;
#ifdef WINDLL
void DLLIMPORT(zcrypt_set_encrypted) OF((int));
#endif
# ifdef NEXTBYTE
# undef NEXTBYTE
# endif
#endif /* FUNZIP */
#endif /* !CRYPT */
#endif /* !__crypt_h */