C.9 FileHashTask

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

Table C.9: Attributes

NameTypeDescriptionDefaultRequired
fileStringFilenamen/aYes
hashtypeIntegerSpecifies what hash algorithm to use. 0=MD5, 1=SHA10No
propertynameStringName of property where the hash value is storedfilehashvalueNo

C.9.1 Example

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