WriteProtection.CryptographicAlgorithmSid 属性

定义

加密哈希算法

表示架构中的以下属性:w:cryptAlgorithmSid

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

属性值

返回 Int32Value

属性

注解

使用此类时,ECMA 国际标准 ECMA-376 中的以下信息可能很有用。

指定特定的加密哈希算法,该算法应与 salt 属性和用户提供的密码一起使用,以便计算哈希值进行比较。

此属性的可能值应解释如下:

算法
1 MD2
2 MD4
3 MD5
4 SHA-1
5 Mac
6 RIPEMD
7 RIPEMD-160
8 定义。 不得使用。
9 Hmac
10 定义。 不得使用。
11 定义。 不得使用。
12 SHA-256
13 SHA-384
14 SHA-512
任何其他值 定义。 不得使用。

请考虑 WordprocessingML 文档,其中一个保护元素中存储了以下信息:

<w:… w:cryptAlgorithmClass="hash"   
  w:cryptAlgorithmType="typeAny"   
  w:cryptAlgorithmSid="1"  
  w:hash="9oN7nWkCAyEZib1RomSJTjmPpCY=" />  

cryptAlgorithmSid1属性值指定 SHA-1 哈希算法应用于从用户定义的密码生成哈希。

此属性的可能值由 ST_DecimalNumber 简单类型定义。

适用于