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.​SafeEvpPKeyHandle

Assembly: System.Security.Cryptography

Inheritance: object → Runtime.​ConstrainedExecution.​CriticalFinalizerObjectRuntime.​InteropServices.​SafeHandle → SafeEvpPKeyHandle

Implemented Interfaces

Represents the <see langword="EVP_PKEY*" /> pointer type from OpenSSL.

Fields and Constants

protected nint
handle

Properties

public bool
IsInvalid
Gets a value indicating whether the handle value is invalid.
public static long
OpenSslVersion
Gets a value representing the version number as reported by the loaded version of OpenSSL.
public bool
IsClosed

Methods

DuplicateHandle​()
Creates another instance of this type or increments the reference count of the handle.
Returns Another instance of this type or the existing handle.
public static SafeEvpPKeyHandle
OpenKeyFromProvider​(string providerName, string keyUri)
Opens a named key using a named <code>OSSL_PROVIDER</code> .
Returns The opened key.
providerName The name of the <code>OSSL_PROVIDER</code> to process the key open request.
keyUri The URI assigned by the <code>OSSL_PROVIDER</code> of the key to open.
public static SafeEvpPKeyHandle
OpenPrivateKeyFromEngine​(string engineName, string keyId)
Open a named private key using a named OpenSSL <code>ENGINE</code> .
Returns The opened key.
engineName The name of the <code>ENGINE</code> to process the private key open request.
keyId The name of the key to open.
public static SafeEvpPKeyHandle
OpenPublicKeyFromEngine​(string engineName, string keyId)
Open a named public key using a named OpenSSL <code>ENGINE</code> .
Returns The opened key.
engineName The name of the <code>ENGINE</code> to process the public key open request.
keyId The name of the key to open.
protected bool
ReleaseHandle​()
public void
Close​()
public void
DangerousAddRef​(Boolean& success)
public nint
DangerousGetHandle​()
public void
DangerousRelease​()
public void
Dispose​()
protected void
Dispose​(bool disposing)
protected void
Finalize​()
protected void
SetHandle​(nint handle)
public void
SetHandleAsInvalid​()
public bool
Equals​(object obj)
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