Switch -HT[B|C] - select hash type [BLAKE2,CRC32] for file checksum


File data integrity in RAR archive is protected by checksums calculated and stored for every archived file.

By default, WinRAR uses CRC32 function to calculate the checksum. RAR 5.0 archive format also allows to select BLAKE2 hash function instead of CRC32.

Specify -htb switch for BLAKE2 hash and -htc for CRC32 function. Since CRC32 is the default algorithm, you may need -htc only to override -htb mode in WinRAR configuration.

CRC32 output is 32 bit length. While CRC32 properties are suitable to detect most of unintentional data errors, it is not reliable enough to verify file data identity. In other words, if two files have the same CRC32, it does not guarantee that file contents is the same.

BLAKE2 output is 256 bit. Being a cryptographically strong hash function, it practically guarantees that if two files have the same value of BLAKE2, their contents is the same. BLAKE2 error detection property is also more reliable than in shorter CRC32.

Since BLAKE2 output is longer, resulting archive is a slightly larger for -htb switch.

If archive headers are unencrypted (no switch -hp), checksums for encrypted RAR 5.0 files are modified using a special password dependent algorithm, to make impossible guessing file contents based on checksums. Do not expect encrypted file checksums to match usual CRC32 and BLAKE2 values.

This switch is supported only by RAR 5.0 format, so you need to use -ma switch with it.

-htb is the command line equivalent of Use BLAKE2 file checksum option in "Archive name and parameters" dialog.

Example

add *.lst to lists.rar using BLAKE2 for file checksums

WinRAR a -ma -htb lists.rar *.lst




Posted on line by http://winrar-france.com