X509Certificate2.Export(X509ContentType, String) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
현재 X509Certificate 개체를 지정된 암호를 사용하여 X509ContentType 값 중 하나로 설명되는 형식으로 바이트 배열로 내보냅니다.
public:
override cli::array <System::Byte> ^ Export(System::Security::Cryptography::X509Certificates::X509ContentType contentType, System::String ^ password);
public override byte[] Export (System.Security.Cryptography.X509Certificates.X509ContentType contentType, string password);
override this.Export : System.Security.Cryptography.X509Certificates.X509ContentType * string -> byte[]
Public Overrides Function Export (contentType As X509ContentType, password As String) As Byte()
매개 변수
- contentType
- X509ContentType
출력 데이터 서식 지정 방법을 설명하는 X509ContentType 값 중 하나입니다.
- password
- String
X.509 인증서 데이터에 액세스하는 데 필요한 암호입니다.
반환
- Byte[]
현재 X509Certificate 개체를 나타내는 바이트의 배열입니다.
예외
Cert, SerializedCert 또는 Pkcs12 이외의 값이 contentType 매개 변수로 전달된 경우
또는 인증서를 내보낼 수 없는 경우
설명
매개 변수는 contentType 열거형의 X509ContentType 다음 값만 허용합니다. CertSerializedCertPkcs12 다른 값을 전달하면 throw CryptographicException 됩니다.
중요
소스 코드 내에서 암호를 하드 코딩하지 마세요. 하드 코딩된 암호는 Ildasm.exe(IL 디스어셈블러) 도구, 16진수 편집기를 사용하거나 Notepad.exe 같은 텍스트 편집기에서 어셈블리를 열어 어셈블리에서 검색할 수 있습니다.