Xceed Encryption Library Documentation
Samples / Hash Sample Application for Visual C++
In This Topic
    Hash Sample Application for Visual C++
    In This Topic

    Description

    This sample demonstrates how to hash a file or a block of memory data using the SHA or Haval hashing methods.

    Project path

    Project path: SAMPLES\VISUAL C++ 6-7\HASH

    Project file name: HASH.DSP

    Demonstrates

    Properties: HashingMethod, HashSize and HashValue

    Method: ReadFile and Hash

    How to use

    This sample is a console application that takes at least one parameter (the output filename) to perform hashing. The sample's command-line usage specifications are: 

    Hash [options] [input_file] output_file 

    The possible options are:

    /h or /? are available to get help,

    /m=hashing_method where hashing_method can be SHA or Haval

    /s=hash_size where hash_size is the supported hash value size different for each hashing method. 

    The parameters between brackets are optional. The optional parameters can be used to specify the hashing method, the hash size produced or to get help. The default hashing method is SHA. The default hash size is set to 160 for SHA and 128 for Haval. If the input file name is omitted, the text to hash is read from the console.