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
属性值
一个表示密钥的安全句柄。A safe handle that represents the key.
- 属性
注解
返回的句柄是当前对象中的句柄的副本 CngKey 。The 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.