CoseSign1Message.VerifyEmbedded 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
驗證該簽章是否對指定金鑰的內容有效。
多載
| 名稱 | Description |
|---|---|
| VerifyEmbedded(AsymmetricAlgorithm, Byte[]) |
驗證該簽章是否對指定金鑰的內容有效。 |
| VerifyEmbedded(AsymmetricAlgorithm, ReadOnlySpan<Byte>) |
驗證該簽章是否對指定金鑰的內容有效。 |
| VerifyEmbedded(CoseKey, ReadOnlySpan<Byte>) |
驗證該簽章是否對指定金鑰的內容有效。 |
VerifyEmbedded(AsymmetricAlgorithm, Byte[])
驗證該簽章是否對指定金鑰的內容有效。
public bool VerifyEmbedded(System.Security.Cryptography.AsymmetricAlgorithm key, byte[]? associatedData = default);
member this.VerifyEmbedded : System.Security.Cryptography.AsymmetricAlgorithm * byte[] -> bool
Public Function VerifyEmbedded (key As AsymmetricAlgorithm, Optional associatedData As Byte() = Nothing) As Boolean
參數
與用於簽署內容的私鑰相關聯的公鑰。
- associatedData
- Byte[]
與簽章相關的額外資料,必須與簽章時提供的值相符。
傳回
true如果簽名有效;否則,。 false
例外狀況
key 是 null。
key 屬於無支撐型。
內容與此訊息分離,使用能接受分離內容的超載。
ProtectedHeaders 標頭沒有值 Algorithm 。
-或-
演算法保護的標頭格式錯誤。
-或-
演算法保護標頭並非此實作所支援的值之一。
-或-
受保護的演算法標頭與指定 key所支援的演算法不符。
另請參閱
適用於
VerifyEmbedded(AsymmetricAlgorithm, ReadOnlySpan<Byte>)
驗證該簽章是否對指定金鑰的內容有效。
public:
bool VerifyEmbedded(System::Security::Cryptography::AsymmetricAlgorithm ^ key, ReadOnlySpan<System::Byte> associatedData);
public bool VerifyEmbedded(System.Security.Cryptography.AsymmetricAlgorithm key, ReadOnlySpan<byte> associatedData);
member this.VerifyEmbedded : System.Security.Cryptography.AsymmetricAlgorithm * ReadOnlySpan<byte> -> bool
Public Function VerifyEmbedded (key As AsymmetricAlgorithm, associatedData As ReadOnlySpan(Of Byte)) As Boolean
參數
與用於簽署內容的私鑰相關聯的公鑰。
- associatedData
- ReadOnlySpan<Byte>
與簽章相關的額外資料,必須與簽章時提供的值相符。
傳回
true如果簽名有效;否則,。 false
例外狀況
key 是 null。
key 屬於無支撐型。
內容與此訊息分離,使用能接受分離內容的超載。
ProtectedHeaders 標頭沒有值 Algorithm 。
-或-
演算法保護的標頭格式錯誤。
-或-
演算法保護標頭並非此實作所支援的值之一。
-或-
受保護的演算法標頭與指定 key所支援的演算法不符。
另請參閱
適用於
VerifyEmbedded(CoseKey, ReadOnlySpan<Byte>)
驗證該簽章是否對指定金鑰的內容有效。
public bool VerifyEmbedded(System.Security.Cryptography.Cose.CoseKey key, ReadOnlySpan<byte> associatedData = default);
member this.VerifyEmbedded : System.Security.Cryptography.Cose.CoseKey * ReadOnlySpan<byte> -> bool
Public Function VerifyEmbedded (key As CoseKey, Optional associatedData As ReadOnlySpan(Of Byte) = Nothing) As Boolean
參數
- key
- CoseKey
與用於簽署內容的私鑰相關聯的公鑰。
- associatedData
- ReadOnlySpan<Byte>
與簽章相關的額外資料,必須與簽章時提供的值相符。
傳回
true如果簽名有效;否則,。 false
例外狀況
key 是 null。
key 屬於無支撐型。
內容與此訊息分離,使用能接受分離內容的超載。
ProtectedHeaders 標頭沒有值 Algorithm 。
-或-
演算法保護的標頭格式錯誤。
-或-
演算法保護標頭並非此實作所支援的值之一。
-或-
受保護的演算法標頭與指定 key所支援的演算法不符。