CngKey.Open 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
기존 키를 나타내는 개체의 CngKey 인스턴스를 만듭니다.
오버로드
| Name | Description |
|---|---|
| Open(String) |
기존 명명된 키를 나타내는 개체의 CngKey 인스턴스를 만듭니다. |
| Open(SafeNCryptKeyHandle, CngKeyHandleOpenOptions) |
기존 키에 대한 CngKey 핸들을 사용하여 개체의 인스턴스를 만듭니다. |
| Open(String, CngProvider) |
지정된 KSP(키 스토리지 공급자)를 사용하여 기존 명명된 키를 나타내는 개체의 인스턴스 CngKey 를 만듭니다. |
| Open(String, CngProvider, CngKeyOpenOptions) |
지정된 KSP(키 스토리지 공급자) 및 키 열기 옵션을 사용하여 기존 명명된 키를 나타내는 개체의 인스턴스 CngKey 를 만듭니다. |
Open(String)
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
기존 명명된 키를 나타내는 개체의 CngKey 인스턴스를 만듭니다.
public:
static System::Security::Cryptography::CngKey ^ Open(System::String ^ keyName);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static System.Security.Cryptography.CngKey Open(string keyName);
public static System.Security.Cryptography.CngKey Open(string keyName);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Open : string -> System.Security.Cryptography.CngKey
static member Open : string -> System.Security.Cryptography.CngKey
Public Shared Function Open (keyName As String) As CngKey
매개 변수
- keyName
- String
키의 이름입니다.
반품
기존 키입니다.
- 특성
예외
keyName은 null입니다.
CNG(Cryptography Next Generation)는 이 시스템에서 지원되지 않습니다.
다른 모든 오류입니다.
설명
이 오버로드는 다음 기본값을 사용합니다.
KSP(키 스토리지 공급자): MicrosoftSoftwareKeyStorageProvider. 다른 KSP를 Open(String, CngProvider) 지정하려면 오버로드를 사용합니다.
키 열기 옵션: CngKeyOpenOptions.None.
적용 대상
Open(SafeNCryptKeyHandle, CngKeyHandleOpenOptions)
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
기존 키에 대한 CngKey 핸들을 사용하여 개체의 인스턴스를 만듭니다.
public:
static System::Security::Cryptography::CngKey ^ Open(Microsoft::Win32::SafeHandles::SafeNCryptKeyHandle ^ keyHandle, System::Security::Cryptography::CngKeyHandleOpenOptions keyHandleOpenOptions);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static System.Security.Cryptography.CngKey Open(Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle keyHandle, System.Security.Cryptography.CngKeyHandleOpenOptions keyHandleOpenOptions);
public static System.Security.Cryptography.CngKey Open(Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle keyHandle, System.Security.Cryptography.CngKeyHandleOpenOptions keyHandleOpenOptions);
[System.Security.SecurityCritical]
public static System.Security.Cryptography.CngKey Open(Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle keyHandle, System.Security.Cryptography.CngKeyHandleOpenOptions keyHandleOpenOptions);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Open : Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle * System.Security.Cryptography.CngKeyHandleOpenOptions -> System.Security.Cryptography.CngKey
static member Open : Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle * System.Security.Cryptography.CngKeyHandleOpenOptions -> System.Security.Cryptography.CngKey
[<System.Security.SecurityCritical>]
static member Open : Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle * System.Security.Cryptography.CngKeyHandleOpenOptions -> System.Security.Cryptography.CngKey
Public Shared Function Open (keyHandle As SafeNCryptKeyHandle, keyHandleOpenOptions As CngKeyHandleOpenOptions) As CngKey
매개 변수
- keyHandle
- SafeNCryptKeyHandle
기존 키에 대한 핸들입니다.
- keyHandleOpenOptions
- CngKeyHandleOpenOptions
임시 키 또는 명명된 키를 나타내는지 여부를 keyHandle 나타내는 열거형 값 중 하나입니다.
반품
기존 키입니다.
- 특성
예외
keyHandle은 null입니다.
keyHandle 가 잘못되었거나 형식이 잘못되었거나 이미 닫혀 있습니다. 키가 CLR(공용 언어 런타임)에서 만든 임시 키이지만 EphemeralKey 값이 지정되지 않은 경우에도 이 예외가 throw됩니다.
CNG(Cryptography Next Generation)는 이 시스템에서 지원되지 않습니다.
다른 모든 오류입니다.
설명
이 오버로드를 사용하면 고급 사용자가 플랫폼 호출 또는 C++의 관리되는 interop 기능에 의존하더라도 CNG 클래스를 사용할 수 있습니다. 예를 들어 키를 NCRYPT_KEY_HANDLE 반환하는 네이티브 라이브러리가 있는 경우 이 오버로드를 통해 키 주위에 관리되는 래퍼를 만들고 CNG 클래스를 사용하여 조작할 수 있습니다.
해당 핸들을 사용하여 키를 열 때 키의 임시 상태를 확인할 수 없으며 직접 지정해야 합니다. 클래스의 여러 속성은 CngKey 이 값을 올바르게 사용합니다. 따라서 올바른 플래그 값을 메서드에 전달해야 합니다 Open .
적용 대상
Open(String, CngProvider)
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
지정된 KSP(키 스토리지 공급자)를 사용하여 기존 명명된 키를 나타내는 개체의 인스턴스 CngKey 를 만듭니다.
public:
static System::Security::Cryptography::CngKey ^ Open(System::String ^ keyName, System::Security::Cryptography::CngProvider ^ provider);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static System.Security.Cryptography.CngKey Open(string keyName, System.Security.Cryptography.CngProvider provider);
public static System.Security.Cryptography.CngKey Open(string keyName, System.Security.Cryptography.CngProvider provider);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Open : string * System.Security.Cryptography.CngProvider -> System.Security.Cryptography.CngKey
static member Open : string * System.Security.Cryptography.CngProvider -> System.Security.Cryptography.CngKey
Public Shared Function Open (keyName As String, provider As CngProvider) As CngKey
매개 변수
- keyName
- String
키의 이름입니다.
- provider
- CngProvider
키가 포함된 KSP입니다.
반품
기존 키입니다.
- 특성
예외
keyName 또는 provider .입니다 null.
CNG(Cryptography Next Generation)는 이 시스템에서 지원되지 않습니다.
다른 모든 오류입니다.
설명
메서드 오버로드와 Open(String) 달리 이 오버로드를 사용하면 공급자를 지정할 수 있습니다. 또한 기본값 CngKeyOpenOptionsNone 이 만들어지고 키에 바인딩됩니다.
적용 대상
Open(String, CngProvider, CngKeyOpenOptions)
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
지정된 KSP(키 스토리지 공급자) 및 키 열기 옵션을 사용하여 기존 명명된 키를 나타내는 개체의 인스턴스 CngKey 를 만듭니다.
public:
static System::Security::Cryptography::CngKey ^ Open(System::String ^ keyName, System::Security::Cryptography::CngProvider ^ provider, System::Security::Cryptography::CngKeyOpenOptions openOptions);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static System.Security.Cryptography.CngKey Open(string keyName, System.Security.Cryptography.CngProvider provider, System.Security.Cryptography.CngKeyOpenOptions openOptions);
public static System.Security.Cryptography.CngKey Open(string keyName, System.Security.Cryptography.CngProvider provider, System.Security.Cryptography.CngKeyOpenOptions openOptions);
[System.Security.SecurityCritical]
public static System.Security.Cryptography.CngKey Open(string keyName, System.Security.Cryptography.CngProvider provider, System.Security.Cryptography.CngKeyOpenOptions openOptions);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Open : string * System.Security.Cryptography.CngProvider * System.Security.Cryptography.CngKeyOpenOptions -> System.Security.Cryptography.CngKey
static member Open : string * System.Security.Cryptography.CngProvider * System.Security.Cryptography.CngKeyOpenOptions -> System.Security.Cryptography.CngKey
[<System.Security.SecurityCritical>]
static member Open : string * System.Security.Cryptography.CngProvider * System.Security.Cryptography.CngKeyOpenOptions -> System.Security.Cryptography.CngKey
Public Shared Function Open (keyName As String, provider As CngProvider, openOptions As CngKeyOpenOptions) As CngKey
매개 변수
- keyName
- String
키의 이름입니다.
- provider
- CngProvider
키가 포함된 KSP입니다.
- openOptions
- CngKeyOpenOptions
키 열기 옵션을 지정하는 열거형 값의 비트 조합입니다(예: 키 열기 위치(컴퓨터 또는 사용자 스토리지)와 UI 프롬프트를 표시하지 않을지 여부).
반품
기존 키입니다.
- 특성
예외
keyName 또는 provider .입니다 null.
CNG(Cryptography Next Generation)는 이 시스템에서 지원되지 않습니다.
다른 모든 오류입니다.
설명
Open(String) 메서드 오버로드와 달리 이 오버로드를 사용하면 공급자와 키 열기 옵션을 모두 지정할 수 있습니다.