WriteProtection.Salt Property

Salt for Password Verifier.Represents the attribte in schema: w:salt

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<SchemaAttrAttribute(, "salt")> _
Public Property Salt As Base64BinaryValue
    Get
    Set
'Usage
Dim instance As WriteProtection
Dim value As Base64BinaryValue

value = instance.Salt

instance.Salt = value
[SchemaAttrAttribute(, "salt")]
public Base64BinaryValue Salt { get; set; }

Property Value

Type: DocumentFormat.OpenXml.Base64BinaryValue
Returns StringValue.

Remarks

The following information from the ECMA International Standard ECMA-376 can be useful when working with this class.

Specifies the salt which was prepended to the user-supplied password before it was hashed using the hashing algorithm defined by the preceding attribute values to generate the hash attribute, and which shall also be prepended to the user-supplied password before attempting to generate a hash value for comparison. A salt is a random string which is added to a user-supplied password before it is hashed in order to prevent a malicious party from pre-calculating all possible password/hash combinations and simply using those precalculated values (often referred to as a dictionary attack).

If this attribute is omitted, then no salt shall be prepended to the user-supplied password before it is hashed for comparison with the stored hash value.

Consider a WordprocessingML document with the following information stored in one of its protection elements:

<w:… w:salt="ZUdHa+D8F/OAKP3I7ssUnQ=="
  w:hash="9oN7nWkCAyEZib1RomSJTjmPpCY=" />

The salt attribute value of ZUdHa+D8F/OAKP3I7ssUnQ== specifies that the user-supplied password shall have this value prepended before it is run through the specified hashing algorithm to generate a resulting hash value for comparison.

The possible values for this attribute are defined by the XML Schema base64Binary data type.

See Also

Reference

WriteProtection Class

WriteProtection Members

DocumentFormat.OpenXml.Wordprocessing Namespace