Document.Encrypt

Encrypt(Permissions, CryptoAlgorithm, IList<X509Certificate2>)

Encrypts the document.

public void Encrypt(Permissions permissions, CryptoAlgorithm cryptoAlgorithm, 
    IList<X509Certificate2> publicCertificates)
ParameterTypeDescription
permissionsPermissionsDocument permissions, see Permissions for details.
cryptoAlgorithmCryptoAlgorithmCryptographic algorithm, see CryptoAlgorithm for details.
publicCertificatesIList`1The 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


Encrypt(string, string, DocumentPrivilege, ICustomSecurityHandler)

Encrypts the document.

public void Encrypt(string userPassword, string ownerPassword, DocumentPrivilege privileges, 
    ICustomSecurityHandler customHandler)
ParameterTypeDescription
userPasswordStringUser password.
ownerPasswordStringOwner password.
privilegesDocumentPrivilegeDocument permissions, see Permissions for details.
customHandlerICustomSecurityHandlerThe 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


Encrypt(string, string, Permissions, ICustomSecurityHandler)

Encrypts the document.

public void Encrypt(string userPassword, string ownerPassword, Permissions permissions, 
    ICustomSecurityHandler customHandler)
ParameterTypeDescription
userPasswordStringUser password.
ownerPasswordStringOwner password.
permissionsPermissionsDocument permissions, see Permissions for details.
customHandlerICustomSecurityHandlerThe 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


Encrypt(string, string, DocumentPrivilege, CryptoAlgorithm, bool)

Encrypts the document.

public void Encrypt(string userPassword, string ownerPassword, DocumentPrivilege privileges, 
    CryptoAlgorithm cryptoAlgorithm, bool usePdf20)
ParameterTypeDescription
userPasswordStringUser password.
ownerPasswordStringOwner password.
privilegesDocumentPrivilegeDocument permissions, see Permissions for details.
cryptoAlgorithmCryptoAlgorithmCryptographic algorithm, see CryptoAlgorithm for details.
usePdf20BooleanSupport 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


Encrypt(string, string, Permissions, CryptoAlgorithm)

Encrypts the document.

public void Encrypt(string userPassword, string ownerPassword, Permissions permissions, 
    CryptoAlgorithm cryptoAlgorithm)
ParameterTypeDescription
userPasswordStringUser password.
ownerPasswordStringOwner password.
permissionsPermissionsDocument permissions, see Permissions for details.
cryptoAlgorithmCryptoAlgorithmCryptographic 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


Encrypt(string, string, Permissions, CryptoAlgorithm, bool)

Encrypts the document.

public void Encrypt(string userPassword, string ownerPassword, Permissions permissions, 
    CryptoAlgorithm cryptoAlgorithm, bool usePdf20)
ParameterTypeDescription
userPasswordStringUser password.
ownerPasswordStringOwner password.
permissionsPermissionsDocument permissions, see Permissions for details.
cryptoAlgorithmCryptoAlgorithmCryptographic algorithm, see CryptoAlgorithm for details.
usePdf20BooleanSupport 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