SignedXml.GetPublicKey 方法

定義

傳回簽章的公開金鑰。Returns the public key of a signature.

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

AsymmetricAlgorithm 物件,包含簽章的公開金鑰;如果找不到金鑰,則為 nullAn AsymmetricAlgorithm object that contains the public key of the signature, or null if the key cannot be found.

例外狀況

KeyInfo 屬性為 nullThe KeyInfo property is null.

備註

GetPublicKey方法 AsymmetricAlgorithm 會傳回物件,其中包含可用於驗證 XML 數位簽章的公開金鑰。The GetPublicKey method returns an AsymmetricAlgorithm object that contains a public key that can be used to verify an XML digital signature.

金鑰必須是 DSA 或索引 RSA 鍵。The key must be either a DSA or an RSA key.

適用於