'Declaration Public Sub AddPasswordProtection( _ ByVal editRestrictions As EditRestrictions, _ ByVal password As String, _ Optional ByVal hashAlgorithm As HashAlgorithm _ )
'Usage Dim instance As Document Dim editRestrictions As EditRestrictions Dim password As String Dim hashAlgorithm As HashAlgorithm instance.AddPasswordProtection(editRestrictions, password, hashAlgorithm)
public void AddPasswordProtection( EditRestrictions editRestrictions, string password, HashAlgorithm hashAlgorithm )
Parameters
- editRestrictions
- Defines the type of restrictions that will be applied to the Document.
- password
- Defines the password that will be used to protect the Document.
- hashAlgorithm
Defines the hashing algorithm that will be used to encrypt the specified password.
If no hashing algorithm is specified, the SHA-512 algorithm will be used by default to encrypt the password.