Udostępnij za pośrednictwem


WriteProtection.Salt Property

Definition

Salt for Password Verifier

Represents the following attribute in the schema: w:salt

[DocumentFormat.OpenXml.SchemaAttr(23, "salt")]
public DocumentFormat.OpenXml.Base64BinaryValue Salt { get; set; }
public DocumentFormat.OpenXml.Base64BinaryValue Salt { get; set; }
[DocumentFormat.OpenXml.SchemaAttr(23, "salt")]
public DocumentFormat.OpenXml.Base64BinaryValue? Salt { get; set; }
[DocumentFormat.OpenXml.SchemaAttr("w:salt")]
public DocumentFormat.OpenXml.Base64BinaryValue? Salt { get; set; }
public DocumentFormat.OpenXml.Base64BinaryValue? Salt { get; set; }
member this.Salt : DocumentFormat.OpenXml.Base64BinaryValue with get, set
[<DocumentFormat.OpenXml.SchemaAttr(23, "salt")>]
member this.Salt : DocumentFormat.OpenXml.Base64BinaryValue with get, set
[<DocumentFormat.OpenXml.SchemaAttr("w:salt")>]
member this.Salt : DocumentFormat.OpenXml.Base64BinaryValue with get, set
Public Property Salt As Base64BinaryValue

Property Value

Returns StringValue.

Attributes

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.

Applies to