home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / diverses / text_cla / cpt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-05-12  |  2.2 KB  |  85 lines

  1. /***********************************************************************
  2. **+
  3. **  Module Name:  cpt.h
  4. **
  5. **  Description:  Cpt defines
  6. **
  7. **  Written by:  John Tal
  8. **
  9. **
  10. **  Modification history:
  11. **
  12. **  Date         Engineer     Mod #          Modification Description
  13. **
  14. **  12-FEB-1992  Tal          v 1.0-000      Initial release
  15. **-
  16. ***********************************************************************/
  17.  
  18. #ifdef CPT_H                    /* Allow compiler one copy */
  19. #else
  20. #define CPT_H
  21.  
  22. #define BUFSIZE 1024
  23. #define ASCIIBYTES  255
  24.  
  25. #define MAX_CONVOLUTIONS 1
  26.  
  27. #define CPT_ID  "CPT_KEY_FILE"
  28. #define CPT_VER  "CPT_VER_1"
  29.  
  30. #define CPT_ENCODE 0
  31. #define CPT_DECODE 1
  32.  
  33. /*
  34. ** Private CPT structure
  35. */
  36.  
  37. struct CPT_WORK_AREA_S
  38. {
  39.    FILE  *KeyFile,*InFile,*OutFile;
  40.    CHAR  szKeyFile[16],szInFile[16],szOutFile[16];
  41.    UCHAR cCptCodes[CPT_DECODE + 1][MAX_CONVOLUTIONS][ASCIIBYTES + 1];
  42.    INT   iCptConvolutions;
  43.    CHAR  szCptId[20];
  44.    CHAR  szCptVers[20];
  45.    CHAR  szCptKeyId[20];
  46.    CHAR  szKeyStr[14];
  47.    INT   iC;
  48.    INT   iJob;
  49. };
  50.  
  51. typedef struct CPT_WORK_AREA_S CPT_WORK_AREA_T;
  52. typedef CPT_WORK_AREA_T * CPT_WORK_AREA_P;
  53.  
  54.  
  55. #ifdef C_ANSI
  56. VOID  APIENTRY lpad(CHAR * str,INT width);
  57. VOID  APIENTRY srep(CHAR * ch,CHAR dh,CHAR eh);
  58. SHORT APIENTRY CptSetJob(CPT_WORK_AREA_P pCptWA,INT iJob);
  59. SHORT APIENTRY CptKeyGen(CPT_WORK_AREA_P pCptWA,INT iSet);
  60. SHORT APIENTRY CptGetKeyData(CPT_WORK_AREA_P pCptWA);
  61. SHORT APIENTRY CptGenKeys(CPT_WORK_AREA_P pCptWA);
  62. SHORT APIENTRY CptReadInKeys(CPT_WORK_AREA_P pCptWA);
  63. SHORT APIENTRY CptReverseKeys(CPT_WORK_AREA_P pCptWA);
  64. SHORT APIENTRY CptCodeFile(CPT_WORK_AREA_P pCptWA);
  65. SHORT APIENTRY CptCodeBuffer(CPT_WORK_AREA_P pCptWA,UCHAR * pcBufIn,UCHAR * pcBufOut,INT iBufLen);
  66. SHORT APIENTRY CptAdjustConvolution(CPT_WORK_AREA_P pCptWA);
  67. SHORT APIENTRY CptUsrCode(CPT_WORK_AREA_P pCptWA);
  68. #else
  69. SHORT APIENTRY lpad();
  70. SHORT APIENTRY srep();
  71. SHORT APIENTRY CptSetJob();
  72. SHORT APIENTRY CptKeyGen();
  73. SHORT APIENTRY CptGetKeyData();
  74. SHORT APIENTRY CptGenKeys();
  75. SHORT APIENTRY CptReadInKeys();
  76. SHORT APIENTRY CptReverseKeys();
  77. SHORT APIENTRY CptCodeFile();
  78. SHORT APIENTRY CptCodeBuffer();
  79. SHORT APIENTRY CptAdjustConvolution();
  80. SHORT APIENTRY CptUsrCode();
  81. #endif
  82.  
  83.  
  84. #endif
  85.