CngKey.Handle 屬性

定義

取得代表原生金鑰 (NCRYPT_KEY_HANDLE) 的安全控制代碼。Gets a safe handle that represents a native key (NCRYPT_KEY_HANDLE).

public:
 property Microsoft::Win32::SafeHandles::SafeNCryptKeyHandle ^ Handle { Microsoft::Win32::SafeHandles::SafeNCryptKeyHandle ^ get(); };
public Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle Handle { get; }
[get: System.Security.SecurityCritical]
public Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle Handle { get; }
member this.Handle : Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle
[<get: System.Security.SecurityCritical>]
member this.Handle : Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle
Public ReadOnly Property Handle As SafeNCryptKeyHandle

屬性值

SafeNCryptKeyHandle

代表金鑰的安全控制代碼。A safe handle that represents the key.

屬性

備註

傳回的控制碼是目前物件中的控制碼重複 CngKeyThe returned handle is a duplicate of the handle in the current CngKey object. 即使目前的已處置,它仍會保存 CngKey ,而且必須個別處置。It will persist even if the current CngKey is disposed, and must be disposed of separately.

您可以依任何順序釋放目前的物件和控制碼,而不會產生任何負面影響。You can release the current object and the handle in any order without any adverse effects.

適用於