語言

SignerInfo 類別

定義

該 SignerInfo 類別代表與 SignedCms 代表 CMS/PKCS #7 訊息的物件相關的簽署者。

public ref class SignerInfo sealed
public sealed class SignerInfo
type SignerInfo = class
Public NotInheritable Class SignerInfo
繼承
SignerInfo

備註

該類別所代表 SignerInfo 的簽章可以是訊息內容上的簽章,也可以是簽章。 後者稱為 副簽名。

此 CMS/PKCS #7 實作僅支援一層反簽。 也就是說,簽名可以形成一個副簽,但該簽名不能再簽名。

此類別沒有公開建構子;因此,它無法公開實例化。 這是一個只讀類別,可從屬性 SignedCms.SignerInfos 存取。

屬性

名稱 Description
Certificate

該 Certificate 屬性會取得與簽署者資訊相關的簽署憑證。

CounterSignerInfos

該 CounterSignerInfos 屬性會取得與簽署者資訊相關的反簽名者集合。

DigestAlgorithm

屬性 DigestAlgorithm 會 Oid 取得代表用於計算簽名的雜湊演算法的物件。

SignatureAlgorithm

取得目前 SignerInfo 物件所使用的簽章演算法識別碼。

SignedAttributes

該 SignedAttributes 屬性會 CryptographicAttributeObjectCollection 擷取與簽署者資訊相關聯的簽名屬性集合。 簽名屬性會與其他訊息內容一同簽名。

SignerIdentifier

該 SignerIdentifier 屬性會取得與簽署者資訊相關的簽署者的憑證識別碼。

UnsignedAttributes

該 UnsignedAttributes 屬性會 CryptographicAttributeObjectCollection 擷取與 SignerInfo 內容相關的未符號屬性集合。 未簽名屬性可以修改而不使簽名失效。

Version

該 Version 屬性會取得簽署者資訊版本。

方法

名稱 Description
AddUnsignedAttribute(AsnEncodedData)

將指定的屬性加入目前的文件。

CheckHash()

此 CheckHash() 方法驗證 CMS/PKCS #7 訊息簽署者資訊的資料完整性。 CheckHash()是一種專門用於特定安全基礎設施應用的方法,當主體在設定物件時使用列舉中的 SubjectIdentifierTypeCmsSigner 成員。 CheckHash() 不驗證簽署者資訊,因為此方法不涉及驗證數位簽章。 若要一般性檢查 CMS/PKCS #7 訊息簽署者資訊及反簽章的完整性與真實性,請使用 CheckSignature(Boolean) OR CheckSignature(X509Certificate2Collection, Boolean) 方法。

CheckSignature(Boolean)

此 CheckSignature(Boolean) 方法驗證訊息的數位簽章,並可選擇性地驗證憑證。

CheckSignature(X509Certificate2Collection, Boolean)

此 CheckSignature(X509Certificate2Collection, Boolean) 方法透過指定的憑證集合驗證訊息的數位簽章,並可選擇性地驗證憑證。

ComputeCounterSignature()
已淘汰.

此 ComputeCounterSignature() 方法會提示使用者選擇簽署憑證,建立一個反簽章,並將該簽章加入 CMS/PKCS #7 訊息中。 反簽名限制在一個層級。

ComputeCounterSignature(CmsSigner)

此 ComputeCounterSignature(CmsSigner) 方法透過指定的簽署者建立反簽,並將該簽章加入 CMS/PKCS #7 訊息中。 反簽名限制在一個層級。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設哈希函式。

(繼承來源 Object)
GetSignature()

取得當前 SignerInfo 物件的簽名。

GetType()

取得目前實例的 Type。

(繼承來源 Object)
MemberwiseClone()

建立目前 Object的淺層複本。

(繼承來源 Object)
RemoveCounterSignature(Int32)

此 RemoveCounterSignature(Int32) 方法移除集合指定索引 CounterSignerInfos 處的反簽名。

RemoveCounterSignature(SignerInfo)

此 RemoveCounterSignature(SignerInfo) 方法移除指定 SignerInfo 物件的反簽名。

RemoveUnsignedAttribute(AsnEncodedData)

移除當前文件中指定的屬性。

ToString()

傳回表示目前 物件的字串。

(繼承來源 Object)

適用於