home *** CD-ROM | disk | FTP | other *** search
- #ifndef __HASH_H__
- #define __HASH_H__
-
- /* Xceed Encryption Library - Hash Sample Application
- * Copyright (c) 2001 Xceed Software Inc.
- *
- * [Hash.h]
- *
- * This console application shows how to hash a file, using different
- * hashing methods. It specifically demonstrates:
- * - The ReadFile and Hash methods.
- * - The HashingMethod, HashSize and HashValue properties.
- *
- * This file is part of the Xceed Encryption Library sample
- * applications. The source code in this file is only intended as
- * a supplement to Xceed Encryption Library's documentation,
- * and is provided "as is", without warranty of any kind, either
- * expressed or implied.
- */
-
- //
- // The Visual C++ compiler will automatically generate wrapper classes
- // around available interfaces found in this type library.
- //
-
- #import "XceedCRY.dll" no_namespace named_guids
-
- //
- // Constants
- //
-
- //Size of the buffer used to read characters from the console.
- #define BUFFER_SIZE 0x4000
-
- //
- // Enumerations
- //
-
- //The different hashing methods supported by the Xceed Encryption
- //library.
- enum EHashingMethod
- {
- hmSHA = 0,
- hmHaval = 1
- };
-
- //
- // Data types
- //
-
- //Structure that will be used in an array providing a correspondance
- //table between the possible hashing methods passed on the command line
- //and their value in Xceed Encryption Library.
- struct SHashingMethod
- {
- const char* pszCommandLine;
- EHashingMethod eMethod;
- };
-
-
- //
- // Prototypes
- //
-
- void ShowHelp();
-
- bool ExtractParameters( int argc, char* argv[],
- IXceedHashingPtr piHash,
- _bstr_t& bstrInputFileName,
- _bstr_t& bstrOutputFileName );
-
- bool SaveHashToFile( _bstr_t bstrOutputFileName,
- IXceedHashingPtr piHash );
-
- #endif // __HASH_H__
-