Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Security.​Cryptography.​ECDiffieHellmanCngPublicKey

Assembly: System.Security.Cryptography

Inheritance: object → ECDiffieHellmanPublicKey → ECDiffieHellmanCngPublicKey

Implemented Interfaces

Specifies an Elliptic Curve Diffie-Hellman (ECDH) public key for use with the <see cref="T:System.Security.Cryptography.ECDiffieHellmanCng" /> class.

Properties

BlobFormat
Gets the key BLOB format for a <see cref="T:System.Security.Cryptography.ECDiffieHellmanCngPublicKey" /> object.

Methods

protected void
Dispose​(bool disposing)
public ECParameters
ExportExplicitParameters​()
Exports the key and explicit curve parameters used by the <see cref="T:System.Security.Cryptography.ECCurve" /> object into an <see cref="T:System.Security.Cryptography.ECParameters" /> object.
Returns The key and explicit curve parameters used by the <see cref="T:System.Security.Cryptography.ECCurve" /> object.
public ECParameters
ExportParameters​()
Exports the key used by the <see cref="T:System.Security.Cryptography.ECCurve" /> object into an <see cref="T:System.Security.Cryptography.ECParameters" /> object.
Returns The key and named curve parameters used by the <see cref="T:System.Security.Cryptography.ECCurve" /> object.
public static ECDiffieHellmanPublicKey
FromByteArray​(byte[] publicKeyBlob, CngKeyBlobFormat format)
Converts a byte array that contains a public key to a <see cref="T:System.Security.Cryptography.ECDiffieHellmanCngPublicKey" /> object according to the specified format.
Returns An object that contains the ECDH public key that is serialized in the byte array.
publicKeyBlob A byte array that contains an Elliptic Curve Diffie-Hellman (ECDH) public key.
format An object that specifies the format of the key BLOB.
FromXmlString​(string xml)
Converts an XML string to an <see cref="T:System.Security.Cryptography.ECDiffieHellmanCngPublicKey" /> object.
Returns An object that contains the ECDH public key that is specified by the given XML.
xml An XML string that contains an Elliptic Curve Diffie-Hellman (ECDH) key.
public CngKey
Import​()
Converts the <see cref="T:System.Security.Cryptography.ECDiffieHellmanCngPublicKey" /> object to a <see cref="T:System.Security.Cryptography.CngKey" /> object.
Returns An object that contains the key represented by the <see cref="T:System.Security.Cryptography.ECDiffieHellmanCngPublicKey" /> object.
public string
ToXmlString​()
Serializes the <see cref="T:System.Security.Cryptography.ECDiffieHellmanCngPublicKey" /> public key to an XML string in RFC 4050 format.
Returns An XML string that contains the serialized <see cref="T:System.Security.Cryptography.ECDiffieHellmanCngPublicKey" /> public key.
public void
Dispose​()
Inherited from ECDiffieHellmanPublicKey
Releases all resources used by the current instance of the <see cref="T:System.Security.Cryptography.ECDiffieHellman" /> class.
public byte[]
ExportSubjectPublicKeyInfo​()
Inherited from ECDiffieHellmanPublicKey
Exports the current key in the X.509 SubjectPublicKeyInfo format.
Returns A byte array containing the X.509 SubjectPublicKeyInfo representation of this key.
public byte[]
ToByteArray​()
Inherited from ECDiffieHellmanPublicKey
Serializes the <see cref="T:System.Security.Cryptography.ECDiffieHellmanPublicKey" /> key BLOB to a byte array.
Returns A byte array that contains the serialized Elliptic Curve Diffie-Hellman (ECDH) public key.
public bool
TryExportSubjectPublicKeyInfo​(Span<​byte> destination, Int32& bytesWritten)
Inherited from ECDiffieHellmanPublicKey
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object