DocumentEncrypt Method (String, String, Permissions, 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,
Permissions permissions,
CryptoAlgorithm cryptoAlgorithm,
bool usePdf20
)
Public Sub Encrypt (
userPassword As String,
ownerPassword As String,
permissions As Permissions,
cryptoAlgorithm As CryptoAlgorithm,
usePdf20 As Boolean
)
public:
void Encrypt(
String^ userPassword,
String^ ownerPassword,
Permissions permissions,
CryptoAlgorithm cryptoAlgorithm,
bool usePdf20
)
member Encrypt :
userPassword : string *
ownerPassword : string *
permissions : Permissions *
cryptoAlgorithm : CryptoAlgorithm *
usePdf20 : bool -> unit
Parameters
- userPassword
- Type: SystemString
User password. - ownerPassword
- Type: SystemString
Owner password. - permissions
- Type: Aspose.PdfPermissions
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