DocumentEncrypt Method (String, String, Permissions, CryptoAlgorithm) |
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
)
Public Sub Encrypt (
userPassword As String,
ownerPassword As String,
permissions As Permissions,
cryptoAlgorithm As CryptoAlgorithm
)
public:
void Encrypt(
String^ userPassword,
String^ ownerPassword,
Permissions permissions,
CryptoAlgorithm cryptoAlgorithm
)
member Encrypt :
userPassword : string *
ownerPassword : string *
permissions : Permissions *
cryptoAlgorithm : CryptoAlgorithm -> 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.
See Also