WriteProtection.CryptographicSpinCount Property

Definition

Iterations to Run Hashing Algorithm

Represents the following attribute in the schema: w:cryptSpinCount

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

Property Value

Returns Int32Value.

Attributes

Remarks

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

Specifies the number of times the hashing function shall be iteratively run (using each iteration's result as the input for the next iteration) when attempting to compare a user-supplied password with the value stored in the hash attribute. Running the algorithm many times increases the cost of exhaustive search attacks correspondingly. Storing this value allows for the number of iterations to be increased over time to accommodate faster hardware (and hence the ability to run more iterations in less time).

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

<w:… w:cryptSpinCount="100000"  
  w:hash="9oN7nWkCAyEZib1RomSJTjmPpCY=" />  

The cryptSpinCount attribute value of 100000 specifies that the hashing function shall be run one hundred thousand times to generate a hash value for comparison with the hash attribute.

The possible values for this attribute are defined by the ST_DecimalNumber simple type.

Applies to