C.10 FileHashTask
Prev | Appendix C. Optional tasks | Next

## C.10 FileHashTask

Calculates either MD5 or SHA1 hash value of a file and stores the value as a hex string in a property.

Table C.11: Attributes

Name | Type | Description | Default | Required
--- | --- | --- | --- | ---
`file` | `String` | Filename | n/a | Yes
`hashtype` | `Integer` | Specifies what hash algorithm to use. 0=MD5, 1=SHA1 | 0 | No
`propertyname` | `String` | Name of property where the hash value is stored | filehashvalue | No

### C.10.1 Example

    <filehash file="${builddir}/${tarball}.tar.${compression}" />
    <echo msg="Hashvalue is; ${filehashvalue}" />

Prev | Up | Next
C.9 ExportPropertiesTask | Home | C.11 FileSizeTask