企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# 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](http://php.net/manual/en/function.hash-algos.php) like "crc32" or "sha512" may be used with help of the `algorithm` attribute. Table C.11:聽Attributes NameTypeDescriptionDefaultRequired`file``String`Filenamen/aYes`hashtype``Integer`Specifies what hash algorithm to use. 0=MD5, 1=SHA10No`algorithm``String`Specifies what hash algorithm to use. Supported [algorithms](http://php.net/manual/en/function.hash-algos.php). n/aNo`propertyname``String`Name of property where the hash value is stored.filehashvalueNo C.10.1 Example ``` <filehash file="${builddir}/${tarball}.tar.${compression}" /> <echo msg="Hashvalue is; ${filehashvalue}" /> ```