WriteProtection.CryptographicSpinCount Property
Iterations to Run Hashing Algorithm.Represents the attribte in schema: w:cryptSpinCount
Namespace: DocumentFormat.OpenXml.Wordprocessing
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
<SchemaAttrAttribute(, "cryptSpinCount")> _
Public Property CryptographicSpinCount As UInt32Value
Get
Set
'Usage
Dim instance As WriteProtection
Dim value As UInt32Value
value = instance.CryptographicSpinCount
instance.CryptographicSpinCount = value
[SchemaAttrAttribute(, "cryptSpinCount")]
public UInt32Value CryptographicSpinCount { get; set; }
Property Value
Type: DocumentFormat.OpenXml.UInt32Value
Returns Int32Value.
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.