Gets/Sets the preferred hashing algorithm used by all methods that produce OpenPGP signatures (all Sign and SigneAndEncrypt methods)

Namespace: DidiSoft.Pgp
Assembly: DidiSoft.Pgp (in DidiSoft.Pgp.dll) Version: 1.7.3.35547

Syntax

C#
public HashAlgorithm Hash { get; set; }
Visual Basic
Public Property Hash As HashAlgorithm
	Get
	Set
Visual C++
public:
property HashAlgorithm Hash {
	HashAlgorithm get ();
	void set (HashAlgorithm value);
}

Remarks

Default is SHA1

Examples

This example demonstrates how to change the preferred hash algorithm used by the library.
CopyC#
PGPLib pgp = new PGPLib();
pgp.Hash = HashAlgorithm.SHA256;
CopyVB.NET
Dim pgp As New PGPLib()
pgp.Hash = HashAlgorithm.SHA256

See Also