Class ModifyProtection
Represents modify-protection settings for a presentation. When a modify password is set, the presentation can be opened read-only without the password, but modifications require the password to be entered.
Maps to the OOXML p:modifyVerifier element.
Inherited Members
Namespace: DRIT.Presentation
Assembly: DRIT.Presentation.dll
Syntax
public sealed class ModifyProtection
Constructors
ModifyProtection()
Initializes a new instance of the ModifyProtection class.
Declaration
public ModifyProtection()
Properties
Algorithm
Gets or sets the password hash algorithm name (e.g.
"SHA-512"). May be null or empty when no password
is set.
Declaration
public string Algorithm { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
HasPassword
Gets a value indicating whether a modify password is currently set.
Declaration
public bool HasPassword { get; }
Property Value
| Type | Description |
|---|---|
| bool |
PasswordHash
Gets or sets the hashed password value (base64). This is the only stored representation of the password; the plaintext password is never retained.
Declaration
public string PasswordHash { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
SaltValue
Gets or sets the salt value (base64) used in the password hash computation.
Declaration
public string SaltValue { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
SpinCount
Gets or sets the number of hash iterations used to derive the password hash.
Declaration
public int SpinCount { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
ClearPassword()
Removes the modify password, allowing unrestricted modification of the presentation.
Declaration
public void ClearPassword()
SetPassword(string)
Sets the modify password by computing and storing the password hash. The plaintext password is not retained.
Declaration
public void SetPassword(string password)
Parameters
| Type | Name | Description |
|---|---|---|
| string | password | The modify password to set. |