C.10 FileHashTask

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

Other popular algorithms like "crc32" or "sha512" may be used with help of the algorithm attribute.

Table C.11: Attributes

hashtypeIntegerSpecifies what hash algorithm to use. 0=MD5, 1=SHA10No
algorithmStringSpecifies what hash algorithm to use. Supported algorithms. n/aNo
propertynameStringName of property where the hash value is stored.filehashvalueNo

C.10.1 Example

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