Aspose::Pdf::Document::Encrypt method
Document::Encrypt(Aspose::Pdf::Permissions, Aspose::Pdf::CryptoAlgorithm, const System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<System::Security::Cryptography::X509Certificates::X509Certificate2>>>&) method
Encrypts the document.
void Aspose::Pdf::Document::Encrypt(Aspose::Pdf::Permissions permissions, Aspose::Pdf::CryptoAlgorithm cryptoAlgorithm, const System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<System::Security::Cryptography::X509Certificates::X509Certificate2>>> &publicCertificates)
| Parameter | Type | Description |
|---|---|---|
| permissions | Aspose::Pdf::Permissions | Document permissions, see Permissions for details. |
| cryptoAlgorithm | Aspose::Pdf::CryptoAlgorithm | Cryptographic algorithm, see CryptoAlgorithm for details. |
| publicCertificates | const System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<System::Security::Cryptography::X509Certificates::X509Certificate2>>>& | The public certificates used for encryption — one per recipient. |
Remarks
This method prepares for encryption. To encrypt a document, you need to call the Save method to save it.
See Also
- Enum Permissions
- Enum CryptoAlgorithm
- Typedef SharedPtr
- Class IList
- Class X509Certificate2
- Class Document
- Namespace Aspose::Pdf
- Library Aspose.PDF for C++
Document::Encrypt(const System::String&, const System::String&, Aspose::Pdf::Permissions, Aspose::Pdf::CryptoAlgorithm) method
Encrypts the document.
void Aspose::Pdf::Document::Encrypt(const System::String &userPassword, const System::String &ownerPassword, Aspose::Pdf::Permissions permissions, Aspose::Pdf::CryptoAlgorithm cryptoAlgorithm)
| Parameter | Type | Description |
|---|---|---|
| userPassword | const System::String& | User password. |
| ownerPassword | const System::String& | Owner password. |
| permissions | Aspose::Pdf::Permissions | Document permissions, see Permissions for details. |
| cryptoAlgorithm | Aspose::Pdf::CryptoAlgorithm | Cryptographic algorithm, see CryptoAlgorithm for details. |
Remarks
This method prepares for encryption. To encrypt a document, you need to call the Save method to save it.
See Also
- Class String
- Enum Permissions
- Enum CryptoAlgorithm
- Class Document
- Namespace Aspose::Pdf
- Library Aspose.PDF for C++
Document::Encrypt(const System::String&, const System::String&, Aspose::Pdf::Permissions, Aspose::Pdf::CryptoAlgorithm, bool) method
Encrypts the document.
void Aspose::Pdf::Document::Encrypt(const System::String &userPassword, const System::String &ownerPassword, Aspose::Pdf::Permissions permissions, Aspose::Pdf::CryptoAlgorithm cryptoAlgorithm, bool usePdf20)
| Parameter | Type | Description |
|---|---|---|
| userPassword | const System::String& | User password. |
| ownerPassword | const System::String& | Owner password. |
| permissions | Aspose::Pdf::Permissions | Document permissions, see Permissions for details. |
| cryptoAlgorithm | Aspose::Pdf::CryptoAlgorithm | Cryptographic algorithm, see CryptoAlgorithm for details. |
| usePdf20 | bool | Support for revision 6 (Extension 8). |
Remarks
This method prepares for encryption. To encrypt a document, you need to call the Save method to save it.
See Also
- Class String
- Enum Permissions
- Enum CryptoAlgorithm
- Class Document
- Namespace Aspose::Pdf
- Library Aspose.PDF for C++
Document::Encrypt(const System::String&, const System::String&, Aspose::Pdf::Permissions, const System::SharedPtr<Security::ICustomSecurityHandler>&) method
Encrypts the document.
void Aspose::Pdf::Document::Encrypt(const System::String &userPassword, const System::String &ownerPassword, Aspose::Pdf::Permissions permissions, const System::SharedPtr<Security::ICustomSecurityHandler> &customHandler)
| Parameter | Type | Description |
|---|---|---|
| userPassword | const System::String& | User password. |
| ownerPassword | const System::String& | Owner password. |
| permissions | Aspose::Pdf::Permissions | Document permissions, see Permissions for details. |
| customHandler | const System::SharedPtr<Security::ICustomSecurityHandler>& | The custom security handler. |
Remarks
This method prepares for encryption. To encrypt a document, you need to call the Save method to save it.
See Also
- Class String
- Enum Permissions
- Typedef SharedPtr
- Class ICustomSecurityHandler
- Class Document
- Namespace Aspose::Pdf
- Library Aspose.PDF for C++
Document::Encrypt(const System::String&, const System::String&, const System::SharedPtr<Facades::DocumentPrivilege>&, Aspose::Pdf::CryptoAlgorithm, bool) method
Encrypts the document.
void Aspose::Pdf::Document::Encrypt(const System::String &userPassword, const System::String &ownerPassword, const System::SharedPtr<Facades::DocumentPrivilege> &privileges, Aspose::Pdf::CryptoAlgorithm cryptoAlgorithm, bool usePdf20)
| Parameter | Type | Description |
|---|---|---|
| userPassword | const System::String& | User password. |
| ownerPassword | const System::String& | Owner password. |
| privileges | const System::SharedPtr<Facades::DocumentPrivilege>& | Document permissions, see Permissions for details. |
| cryptoAlgorithm | Aspose::Pdf::CryptoAlgorithm | Cryptographic algorithm, see CryptoAlgorithm for details. |
| usePdf20 | bool | Support for revision 6 (Extension 8). |
Remarks
This method prepares for encryption. To encrypt a document, you need to call the Save method to save it.
See Also
- Class String
- Typedef SharedPtr
- Class DocumentPrivilege
- Enum CryptoAlgorithm
- Class Document
- Namespace Aspose::Pdf
- Library Aspose.PDF for C++
Document::Encrypt(const System::String&, const System::String&, const System::SharedPtr<Facades::DocumentPrivilege>&, const System::SharedPtr<Security::ICustomSecurityHandler>&) method
Encrypts the document.
void Aspose::Pdf::Document::Encrypt(const System::String &userPassword, const System::String &ownerPassword, const System::SharedPtr<Facades::DocumentPrivilege> &privileges, const System::SharedPtr<Security::ICustomSecurityHandler> &customHandler)
| Parameter | Type | Description |
|---|---|---|
| userPassword | const System::String& | User password. |
| ownerPassword | const System::String& | Owner password. |
| privileges | const System::SharedPtr<Facades::DocumentPrivilege>& | Document permissions, see Permissions for details. |
| customHandler | const System::SharedPtr<Security::ICustomSecurityHandler>& | The custom security handler. |
Remarks
This method prepares for encryption. To encrypt a document, you need to call the Save method to save it.
See Also
- Class String
- Typedef SharedPtr
- Class DocumentPrivilege
- Class ICustomSecurityHandler
- Class Document
- Namespace Aspose::Pdf
- Library Aspose.PDF for C++