home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / HPACK78S.ZIP / crypt / crypt.h < prev    next >
C/C++ Source or Header  |  1992-11-28  |  2KB  |  50 lines

  1. /****************************************************************************
  2. *                                                                            *
  3. *                            HPACK Multi-System Archiver                        *
  4. *                            ===========================                        *
  5. *                                                                            *
  6. *                            Encryption Interface Header                        *
  7. *                             CRYPT.H  Updated 10/03/92                        *
  8. *                                                                            *
  9. * This program is protected by copyright and as such any use or copying of    *
  10. *  this code for your own purposes directly or indirectly is highly uncool    *
  11. *                      and if you do so there will be....trubble.                *
  12. *                 And remember: We know where your kids go to school.            *
  13. *                                                                            *
  14. *        Copyright 1990 - 1992  Peter C.Gutmann.  All rights reserved        *
  15. *                                                                            *
  16. ****************************************************************************/
  17.  
  18. #ifdef __MAC__
  19.   #include "hpackio.h"
  20. #else
  21.   #include "io/hpackio.h"
  22. #endif /* __MAC__ */
  23.  
  24. /* The size of the GP crypto buffer.  Set to MAX_BYTE_PRECISION * 33 */
  25.  
  26. #define CRYPT_BUFSIZE   8580
  27.  
  28. /* The type of encryption key to use (main or secondary) */
  29.  
  30. #define MAIN_KEY        TRUE
  31. #define SECONDARY_KEY    FALSE
  32.  
  33. /* Prototypes for the encryption functions */
  34.  
  35. void initCrypt( void );
  36. void initPassword( const BOOLEAN isMainKey );
  37. void encryptCFB( BYTE *buffer, int count );
  38. void decryptCFB( BYTE *buffer, int count );
  39. void saveCryptState( void );
  40. void restoreCryptState( void );
  41. void endCrypt( void );
  42. void wipeFile( const char *filePath );
  43. BYTE getStrongRandomByte( void );
  44. WORD getStrongRandomWord( void );
  45. LONG getStrongRandomLong( void );
  46. BOOLEAN checkSignature( LONG dataStartPos, LONG dataLength );
  47. int createSignature( LONG dataStartPos, LONG dataLength, char *userID );
  48. BOOLEAN getEncryptionInfo( int *length );
  49. int putEncryptionInfo( const BOOLEAN isMainKey );
  50.