home *** CD-ROM | disk | FTP | other *** search
- /***********************************************************************
- **+
- ** Module Name: cpt.h
- **
- ** Description: Cpt defines
- **
- ** Written by: John Tal
- **
- **
- ** Modification history:
- **
- ** Date Engineer Mod # Modification Description
- **
- ** 12-FEB-1992 Tal v 1.0-000 Initial release
- **-
- ***********************************************************************/
-
- #ifdef CPT_H /* Allow compiler one copy */
- #else
- #define CPT_H
-
- #define BUFSIZE 1024
- #define ASCIIBYTES 255
-
- #define MAX_CONVOLUTIONS 1
-
- #define CPT_ID "CPT_KEY_FILE"
- #define CPT_VER "CPT_VER_1"
-
- #define CPT_ENCODE 0
- #define CPT_DECODE 1
-
- /*
- ** Private CPT structure
- */
-
- struct CPT_WORK_AREA_S
- {
- FILE *KeyFile,*InFile,*OutFile;
- CHAR szKeyFile[16],szInFile[16],szOutFile[16];
- UCHAR cCptCodes[CPT_DECODE + 1][MAX_CONVOLUTIONS][ASCIIBYTES + 1];
- INT iCptConvolutions;
- CHAR szCptId[20];
- CHAR szCptVers[20];
- CHAR szCptKeyId[20];
- CHAR szKeyStr[14];
- INT iC;
- INT iJob;
- };
-
- typedef struct CPT_WORK_AREA_S CPT_WORK_AREA_T;
- typedef CPT_WORK_AREA_T * CPT_WORK_AREA_P;
-
-
- #ifdef C_ANSI
- VOID APIENTRY lpad(CHAR * str,INT width);
- VOID APIENTRY srep(CHAR * ch,CHAR dh,CHAR eh);
- SHORT APIENTRY CptSetJob(CPT_WORK_AREA_P pCptWA,INT iJob);
- SHORT APIENTRY CptKeyGen(CPT_WORK_AREA_P pCptWA,INT iSet);
- SHORT APIENTRY CptGetKeyData(CPT_WORK_AREA_P pCptWA);
- SHORT APIENTRY CptGenKeys(CPT_WORK_AREA_P pCptWA);
- SHORT APIENTRY CptReadInKeys(CPT_WORK_AREA_P pCptWA);
- SHORT APIENTRY CptReverseKeys(CPT_WORK_AREA_P pCptWA);
- SHORT APIENTRY CptCodeFile(CPT_WORK_AREA_P pCptWA);
- SHORT APIENTRY CptCodeBuffer(CPT_WORK_AREA_P pCptWA,UCHAR * pcBufIn,UCHAR * pcBufOut,INT iBufLen);
- SHORT APIENTRY CptAdjustConvolution(CPT_WORK_AREA_P pCptWA);
- SHORT APIENTRY CptUsrCode(CPT_WORK_AREA_P pCptWA);
- #else
- SHORT APIENTRY lpad();
- SHORT APIENTRY srep();
- SHORT APIENTRY CptSetJob();
- SHORT APIENTRY CptKeyGen();
- SHORT APIENTRY CptGetKeyData();
- SHORT APIENTRY CptGenKeys();
- SHORT APIENTRY CptReadInKeys();
- SHORT APIENTRY CptReverseKeys();
- SHORT APIENTRY CptCodeFile();
- SHORT APIENTRY CptCodeBuffer();
- SHORT APIENTRY CptAdjustConvolution();
- SHORT APIENTRY CptUsrCode();
- #endif
-
-
- #endif