Xceed Encryption Library Documentation
HashSize property
Xceed Hashing control reference > Hashing Method objects > XceedSHAHashingMethod object > HashSize property

Description

The HashSize property determines the size, in bits, of the hash value that should be produced by the hash function when hashing data. This property can only be set to the specific values listed in the HashingMethod property's help topic.

Data type

Short integer

Default value

128 for the XceedHavalHashingMethod object's HashSize property

160 for the XceedSHAHashingMethod object's HashSize property

Remarks

This property cannot be set during the hashing process.

The strength of a hash function's "non-collision" property is known to be approximately half its size. Hence we will say that a 128-bit hash value has a 64-bit strength against collisions due to the so-called "birthday attack". This is why, for instance, that SHA-2 or Haval with a hash size of 256 bits should be used if you need to hash data that has been encrypted with a 128-bit secret key.

Applicable methods

Hash, ReadFile, WriteFile and ProcessFile