DocumentEncrypt Method (String, String, DocumentPrivilege, CryptoAlgorithm, Boolean) |
Encrypts the document. Call then Save to get encrypted version of the document.
Namespace: Aspose.PdfAssembly: Aspose.PDF (in Aspose.PDF.dll) Version: 20.3
Syntaxpublic void Encrypt(
string userPassword,
string ownerPassword,
DocumentPrivilege privileges,
CryptoAlgorithm cryptoAlgorithm,
bool usePdf20
)
Public Sub Encrypt (
userPassword As String,
ownerPassword As String,
privileges As DocumentPrivilege,
cryptoAlgorithm As CryptoAlgorithm,
usePdf20 As Boolean
)
public:
void Encrypt(
String^ userPassword,
String^ ownerPassword,
DocumentPrivilege^ privileges,
CryptoAlgorithm cryptoAlgorithm,
bool usePdf20
)
member Encrypt :
userPassword : string *
ownerPassword : string *
privileges : DocumentPrivilege *
cryptoAlgorithm : CryptoAlgorithm *
usePdf20 : bool -> unit
Parameters
- userPassword
- Type: SystemString
User password. - ownerPassword
- Type: SystemString
Owner password. - privileges
- Type: Aspose.Pdf.FacadesDocumentPrivilege
Document permissions, see Permissions for details. - cryptoAlgorithm
- Type: Aspose.PdfCryptoAlgorithm
Cryptographic algorithm, see CryptoAlgorithm for details. - usePdf20
- Type: SystemBoolean
Support for revision 6 (Extension 8).
See Also