用C#加密PDF文档 [英] Encrypting PDF Document with C#
问题描述
是否可以使用对称加密来加密pdf的内容?并且acrobat等自动支持解密?
is it possible to encrypt the content of a pdf with a symmetric encryption? and does acrobat etc. support the decryption automatically?
我需要一个api在c#/。net加密文件的内容!
i need an api in c#/.net to encrypt the content of the file!
Kind Regard
Michael
Kind Regard Michael
推荐答案
Docotic.Pdf库可以为您加密或解密PDF文件。
Docotic.Pdf library can encrypt or decrypt PDF files for you.
PDF参考定义了两个标准加密算法:RC4和AES。两种算法都是对称的。 RC4使用长度为40到128位的键。 AES使用128位密钥(256个密钥即将成为新标准)。
PDF Reference defines two standard encryption algorithms: RC4 and AES. Both algorithms are symmetric. RC4 uses keys with 40 to 128 bits length. AES uses 128 bit keys (256 keys are to become new standard soon).
加密的PDF可以完全锁定(您和其他人将无法打开它们没有密码)或只是受保护的修改(任何人都可以打开他们没有任何密码和良好的观众将不允许更改)。
Encrypted PDFs can be completely locked (you and anyone else won't be able to open them without password) or just "protected" from modifications (anyone will be able to open them without any password and well-behaved viewers won't allow to change them).
请看一下示例,显示如何使用AES 128位加密PDF文档。
Please take a look at sample that shows how to encrypt PDF document with AES 128 bit.
免责声明:我为图书馆供应商Bit Miracle工作。
Disclaimer: I work for Bit Miracle, vendor of the library.
这篇关于用C#加密PDF文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!