home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 September / Chip_2002-09_cd1.bin / zkuste / vbasic / Data / Utils / XZipComp.exe / XceedEncryption.Cab / F112976_Encrypt.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-06-06  |  1.9 KB  |  79 lines

  1. #ifndef __ENCRYPT_H__
  2. #define __ENCRYPT_H__
  3.  
  4. /* Xceed Encryption Library - Encrypt Sample Application
  5.  * Copyright (c) 2001 Xceed Software Inc.
  6.  *
  7.  * [Encrypt.h]
  8.  *
  9.  * This console application shows how to encrypt a file, using different
  10.  * encryption methods. It specifically demonstrates:
  11.  *  - The SetSecretKeyFromPassPhrase, SetRandomInitVector, WriteFile and 
  12.  *    ProcessFile methods.
  13.  *  - The EncryptionMethod, EncryptionMode properties.
  14.  *
  15.  * This file is part of the Xceed Encryption Library sample 
  16.  * applications. The source code in this file is only intended as 
  17.  * a supplement to Xceed Encryption Library's documentation, 
  18.  * and is provided "as is", without warranty of any kind, either 
  19.  * expressed or implied. 
  20.  */
  21.  
  22. //
  23. // The Visual C++ compiler will automatically generate wrapper classes 
  24. // around available interfaces found in this type library.
  25. //
  26.  
  27. #import "XceedCRY.dll" no_namespace named_guids
  28.  
  29. //
  30. // Constants
  31. //
  32.  
  33. //Size of the buffer used to read characters from the console.
  34. #define BUFFER_SIZE   0x4000
  35.  
  36. //The size of pass phrase generated secret key. It could be one of the following : 
  37. //128, 192 or 256.
  38. #define KEY_SIZE      128
  39.  
  40.  
  41. //
  42. // Enumerations
  43. //
  44.  
  45. //The different encryption methods supported by the Xceed Encryption
  46. //library.
  47. enum EEncryptionMethod
  48. {
  49.   emRijndael = 0,
  50.   emTwofish = 1
  51. };
  52.  
  53. //
  54. // Data types
  55. //
  56.  
  57. //Structure that will be used in an array providing a correspondance
  58. //table between the possible encryption methods passed on the command line
  59. //and their value in Xceed Encryption Library.
  60. struct SEncryptionMethod
  61. {
  62.   const char*   pszCommandLine;
  63.   EEncryptionMethod eMethod;
  64. };
  65.  
  66.  
  67. //
  68. // Prototypes
  69. //
  70.  
  71. void ShowHelp();
  72.  
  73. bool ExtractParameters( int argc, char* argv[],
  74.                         IXceedEncryptionPtr piEncrypt,
  75.                         _bstr_t& bstrInputFileName,
  76.                         _bstr_t& bstrOutputFileName );
  77.  
  78. #endif // __ENCRYPT_H__
  79.