共用方式為


SignedXml.GetPublicKey 方法

定義

傳回簽章的公開金鑰。

protected:
 virtual System::Security::Cryptography::AsymmetricAlgorithm ^ GetPublicKey();
protected virtual System.Security.Cryptography.AsymmetricAlgorithm? GetPublicKey ();
protected virtual System.Security.Cryptography.AsymmetricAlgorithm GetPublicKey ();
abstract member GetPublicKey : unit -> System.Security.Cryptography.AsymmetricAlgorithm
override this.GetPublicKey : unit -> System.Security.Cryptography.AsymmetricAlgorithm
Protected Overridable Function GetPublicKey () As AsymmetricAlgorithm

傳回

AsymmetricAlgorithm 物件,包含簽章的公開金鑰;如果找不到金鑰,則為 null

例外狀況

KeyInfo 屬性為 null

備註

方法 GetPublicKey 會傳 AsymmetricAlgorithm 回 物件,其中包含可用來驗證 XML 數位簽名的公鑰。

索引鍵必須是 DSARSA 索引鍵。

適用於