Configuring Encryption

Types of Encryption

Aspose.Cells for Reporting Services supports encryption when exporting Excel files. It supports three encryption types:

  • XOR
  • WEAK ENCRYPTION
  • Microsoft Strong Cryptographic Provider

Configuration Information

Configuration information for encryption is stored in the Aspose.Cells.ReportingServices.xml file. When the value of Encryption is set to "off", Aspose.Cells.ReportingServices turns encryption off.

XML

<Encryption value="off">
  <Report name="">
    <Password value=""/>
    <EncryptionType value="Microsoft Strong Cryptographic Provider"/>
    <KeyLength value="128"/>
  </Report>
</Encryption>

When Encryption is set to "on", Aspose.Cells.ReportingServices turns on encryption.

<Encryption value="on">

There are four parameters in the Encryption section: ReportName, Password, EncryptionType, and KeyLength.

  • ReportName – Sets the report that needs encryption settings. A report uses the same encryption method when the parameter is blank.
  • Password – Sets the password. It cannot be left blank.
  • EncryptionType – Sets the encryption type. It cannot be left blank.
  • KeyLength – Sets the key length. It cannot be left blank.

XML

<Encryption value="on">
  <Report name="Test">
    <Password value="12345"/>
    <EncryptionType value="Microsoft Strong Cryptographic Provider"/>
    <KeyLength value="128"/>
  </Report>
  <Report name="">
    <Password value="123456"/>
    <EncryptionType value="XOR"/>
    <KeyLength value="128"/>
  </Report>
</Encryption>