# <checksum>

Calculates checksums for a set of files. Loosely based on Ant's Checksum task.

This task takes a set of input files in a fileset and calculates a checksum for each one of them. You can specify the algorithm to use when calculating the checksum value (MD5 or SHA1, for example). The calculated value is saved to a file with the same name as the input file and an added extension either based on the algorithm name (e.g. .MD5), or whatever is specified through the fileext attribute.

### Parameters

Attribute | Type | Description | Required
--- | --- | --- | ---
algorithm | string | Name of Algorithm to use when calculating the checksum. Can be MD5 or SHA1. | True
fileext | string | The generated checksum file's name will be the original filename with "." and fileext added to it. Defaults to the algorithm name being used | False
failonerror | bool | Determines if task failure stops the build, or is just reported. The default is true. | False
if | bool | If true then the task will be executed; otherwise, skipped. The default is true. | False
unless | bool | Opposite of `if`. If false then the task will be executed; otherwise, skipped. The default is false. | False
verbose | bool | Determines whether the task should report detailed build log messages. The default is false. | False

### Nested Elements:

#### <fileset>

Set of files to use as input

#### </fileset>

### Examples

-                 <checksum algorithm="MD5" fileext="MD5">
                      <fileset>
                          <include name="${outputdir}\*.dll"/>
                      </fileset>
                  </checksum>

### Requirements

Assembly: NAnt.Contrib.Tasks (0.91.4312.0)