ECDiffieHellmanPublicKey.ToByteArray 方法

定義

警告

ECDiffieHellmanPublicKey.ToByteArray() and the associated constructor do not have a consistent and interoperable implementation on all platforms. Use ECDiffieHellmanPublicKey.ExportSubjectPublicKeyInfo() instead.

ECDiffieHellmanPublicKey 金鑰 BLOB 序列化為位元組陣列。

public:
 virtual cli::array <System::Byte> ^ ToByteArray();
public virtual byte[] ToByteArray ();
[System.Obsolete("ECDiffieHellmanPublicKey.ToByteArray() and the associated constructor do not have a consistent and interoperable implementation on all platforms. Use ECDiffieHellmanPublicKey.ExportSubjectPublicKeyInfo() instead.", DiagnosticId="SYSLIB0043", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public virtual byte[] ToByteArray ();
abstract member ToByteArray : unit -> byte[]
override this.ToByteArray : unit -> byte[]
[<System.Obsolete("ECDiffieHellmanPublicKey.ToByteArray() and the associated constructor do not have a consistent and interoperable implementation on all platforms. Use ECDiffieHellmanPublicKey.ExportSubjectPublicKeyInfo() instead.", DiagnosticId="SYSLIB0043", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
abstract member ToByteArray : unit -> byte[]
override this.ToByteArray : unit -> byte[]
Public Overridable Function ToByteArray () As Byte()

傳回

Byte[]

包含序列化橢圓曲線 Diffie-Hellman (ECDH) 公開金鑰的位元組陣列。

屬性

例外狀況

Linux 和 macOS:在所有情況下。

適用於