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:在所有情况下。

适用于