All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

PdfSignatureOptions.HashAlgorithm Property

Specifies the hash algorithm to be used in a PDF document.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.Printing.v20.2.Core.dll

Declaration

public PdfHashAlgorithm HashAlgorithm { get; set; }
Public Property HashAlgorithm As PdfHashAlgorithm

Property Value

Type Description
PdfHashAlgorithm

The hash algorithm to be used in a PDF document.

Property Paths

You can access this nested property as listed below:

Remarks

IMPORTANT

For security reasons, do not set this property to SHA-1.

The code sample below shows how to set a PDF export file's hash algorithm to SHA-512.

using DevExpress.XtraReports.UI;
using DevExpress.XtraPrinting;
// ...
// Create a simple report.
XtraReport report = new XtraReport() {
  Name = "SimpleReport",
    Bands = {
      new DetailBand() {
        Controls = {
          new XRLabel() {
            Text = "Simple Report"
          }
        }
      }
    }
  }
};
// Use the SHA-512 hash algorithm.
report.ExportOptions.Pdf.SignatureOptions.HashAlgorithm = PdfHashAlgorithm.SHA512;
// Export the report to the user's Downloads folder.
report.ExportToPdf(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + @"\Downloads\" + report.Name + ".pdf");
See Also