Redigera

Dela via


SafeEvpPKeyHandle.DuplicateHandle Method

Definition

Creates another instance of this type or increments the reference count of the handle.

public:
 System::Security::Cryptography::SafeEvpPKeyHandle ^ DuplicateHandle();
public System.Security.Cryptography.SafeEvpPKeyHandle DuplicateHandle ();
member this.DuplicateHandle : unit -> System.Security.Cryptography.SafeEvpPKeyHandle
Public Function DuplicateHandle () As SafeEvpPKeyHandle

Returns

Another instance of this type or the existing handle.

Exceptions

This handle is invalid.

Remarks

In .NET 8 and earlier versions, this method creates a new EVP_PKEY instance. In .NET 9 and later versions, this method increments the reference count of the existing EVP_PKEY instance and returns a handle to the same key.

Applies to

See also