数字信息的保护一直是网络世界中的重要方面。为了保护数字内容,已经设计了各种方式和技术。因此,本文明确针对MS PowerPoint演示文稿的安全性,并提供保护PPTX文档安全的不同方法。在本文中,将学习如何使用C#使用密码或数字签名保护PowerPoint PPTX。
- 使用密码保护PowerPoint PPTX
- 使用数字签名保护PowerPoint文档
- 验证经过数字签名的PowerPoint演示文稿
>>你可以下载Aspose.Slides v20.10测试体验。
使用C#中的密码保护PowerPoint PPTX
以下是使用密码保护PowerPoint PPTX演示文稿的步骤。
- 使用Presentation类加载PPTX演示文稿。
- 使用Presentation.ProtectionManager.Encrypt(String)方法加密演示文稿。
- 使用Presentation.Save(String,SaveFormat)方法保存演示文稿。
下面的代码示例演示如何使用C#使用密码保护PPTX。
// Instantiate a Presentation object that represents a presentation file using (Presentation pres = new Presentation("presentation.pptx")) { // Protect with password pres.ProtectionManager.Encrypt("password"); /