CngKey.Export(CngKeyBlobFormat) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Exports the key material into a BLOB, in the specified format.
public:
cli::array <System::Byte> ^ Export(System::Security::Cryptography::CngKeyBlobFormat ^ format);
public byte[] Export (System.Security.Cryptography.CngKeyBlobFormat format);
[System.Security.SecurityCritical]
public byte[] Export (System.Security.Cryptography.CngKeyBlobFormat format);
member this.Export : System.Security.Cryptography.CngKeyBlobFormat -> byte[]
[<System.Security.SecurityCritical>]
member this.Export : System.Security.Cryptography.CngKeyBlobFormat -> byte[]
Public Function Export (format As CngKeyBlobFormat) As Byte()
Parameters
- format
- CngKeyBlobFormat
An object that specifies the format of the key BLOB.
Returns
A BLOB that contains the key material in the specified format.
- Attributes
Exceptions
format
is null
.
All other errors. Typically, the ExportPolicy does not allow the key to be exported.
Remarks
Cryptography Next Generation (CNG) allows export in any format that the underlying key storage provider (KSP) supports. For example, on Windows Vista,the default KSP (which is MicrosoftSoftwareKeyStorageProvider) only allows export of private keys in the Pkcs8PrivateBlob, EccPrivateBlob, and OpaqueTransportBlob formats. This restriction is controlled by the underlying KSP. If you use a different KSP, other formats may apply.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback을 참조하세요.
출시 예정: 2024년 내내 콘텐츠 피드백 메커니즘인 GitHub 문제를 단계적으로 폐지하고 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은다음에 대한 사용자 의견 제출 및 보기