Xceed Encryption Library Documentation
HashingMethod property (XceedRijndaelEncryptionMethod object)
Xceed Encryption control reference > Encryption Method objects > XceedRijndaelEncryptionMethod object > HashingMethod property (XceedRijndaelEncryptionMethod object)

Description

The HashingMethod property allows you to specify or find out which hashing algorithm the library will use to internally hash data when you call the SetSecretKeyFromPassPhrase or SetRandomSecretKey or SetInitVectorFromPassPhrase methods. To specify the algorithm, you must instantiate and assign a Hashing Method object to this property. If you read the contents of the property, you will obtain an instance of a Hashing Method object.

Data type

An Hashing Method object

Possible values
 

Value Description
XceedSHAHashingMethod object  Use the SHA-2 hashing algorithm, which can produce either 160,256,384 or 512-bit hash values.
XceedHavalHashingMethod object  Use the Haval hashing algorithm, which can produce either 128,160,192,224 or 256-bit hash values.

Default value

An instance of the XceedSHAHashingMethod object with a 256-bit default hash size

Remarks

This property cannot be set during the hashing process.

If the HashSize property of your XceedSHAHashingMethod or XceedHavalHashingMethod object is set to a greater number of bits than the Secret Key bit size you are using to encrypt or decrypt data, the extra bits in the hash value will be ignored. If your HashSize property indicates less bits than the amount of bits in your Secret Key, the library will perform multiple hashes to obtain enough bits. This may reduce the effectiveness of the encryption.

Applicable methods

SetSecretKeyFromPassPhrase, SetRandomSecretKey, SetInitVectorFromPassPhrase