AsymmetricAlgorithm.TryExportEncryptedPkcs8PrivateKeyPem 메서드

정의

오버로드

TryExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<Byte>, PbeParameters, Span<Char>, Int32)

바이트 기반 암호인 PEM 인코딩을 사용하여 PKCS#8 EncryptedPrivateKeyInfo 형식으로 현재 키를 내보내려고 시도합니다.

TryExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<Char>, PbeParameters, Span<Char>, Int32)

PKCS#8 EncryptedPrivateKeyInfo 형식의 현재 키를 문자 기반 암호인 PEM 인코딩으로 내보냅니다.

TryExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<Byte>, PbeParameters, Span<Char>, Int32)

Source:
AsymmetricAlgorithm.cs
Source:
AsymmetricAlgorithm.cs

바이트 기반 암호인 PEM 인코딩을 사용하여 PKCS#8 EncryptedPrivateKeyInfo 형식으로 현재 키를 내보내려고 시도합니다.

public:
 bool TryExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<System::Byte> passwordBytes, System::Security::Cryptography::PbeParameters ^ pbeParameters, Span<char> destination, [Runtime::InteropServices::Out] int % charsWritten);
public bool TryExportEncryptedPkcs8PrivateKeyPem (ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters, Span<char> destination, out int charsWritten);
member this.TryExportEncryptedPkcs8PrivateKeyPem : ReadOnlySpan<byte> * System.Security.Cryptography.PbeParameters * Span<char> * int -> bool
Public Function TryExportEncryptedPkcs8PrivateKeyPem (passwordBytes As ReadOnlySpan(Of Byte), pbeParameters As PbeParameters, destination As Span(Of Char), ByRef charsWritten As Integer) As Boolean

매개 변수

passwordBytes
ReadOnlySpan<Byte>

키 자료를 암호화할 때 암호로 사용할 바이트입니다.

pbeParameters
PbeParameters

키 자료를 암호화할 때 사용할 PBE(암호 기반 암호화) 매개 변수입니다.

destination
Span<Char>

PEM으로 인코딩된 PKCS#8 EncryptedPrivateKeyInfo 데이터를 받을 문자 범위입니다.

charsWritten
Int32

이 메서드가 반환되는 경우 에 기록 destination된 문자 수를 나타내는 값이 포함됩니다. 이 매개 변수는 초기화되지 않은 것으로 처리됩니다.

반환

destination이 출력을 받을 충분한 크기이면 true, 아니면 false입니다.

예외

키를 내보낼 수 없습니다.

설명

PEM으로 인코딩된 PKCS#8 EncryptedPrivateKeyInfo는 로 시작하고 -----BEGIN ENCRYPTED PRIVATE KEY----- PEM 경계 간에 키의 base64로 인코딩된 DER 콘텐츠를 사용하여 로 끝납니 -----END ENCRYPTED PRIVATE KEY-----다.

PEM은 IETF RFC 7468 "strict" 인코딩 규칙에 따라 인코딩됩니다.

적용 대상

TryExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<Char>, PbeParameters, Span<Char>, Int32)

Source:
AsymmetricAlgorithm.cs
Source:
AsymmetricAlgorithm.cs
Source:
AsymmetricAlgorithm.cs

PKCS#8 EncryptedPrivateKeyInfo 형식의 현재 키를 문자 기반 암호인 PEM 인코딩으로 내보냅니다.

public:
 bool TryExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<char> password, System::Security::Cryptography::PbeParameters ^ pbeParameters, Span<char> destination, [Runtime::InteropServices::Out] int % charsWritten);
public bool TryExportEncryptedPkcs8PrivateKeyPem (ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters, Span<char> destination, out int charsWritten);
member this.TryExportEncryptedPkcs8PrivateKeyPem : ReadOnlySpan<char> * System.Security.Cryptography.PbeParameters * Span<char> * int -> bool
Public Function TryExportEncryptedPkcs8PrivateKeyPem (password As ReadOnlySpan(Of Char), pbeParameters As PbeParameters, destination As Span(Of Char), ByRef charsWritten As Integer) As Boolean

매개 변수

password
ReadOnlySpan<Char>

키 자료를 암호화할 때 사용할 암호입니다.

pbeParameters
PbeParameters

키 자료를 암호화할 때 사용할 PBE(암호 기반 암호화) 매개 변수입니다.

destination
Span<Char>

PEM으로 인코딩된 PKCS#8 EncryptedPrivateKeyInfo 데이터를 받을 문자 범위입니다.

charsWritten
Int32

이 메서드가 반환되는 경우 에 기록 destination된 문자 수를 나타내는 값이 포함됩니다. 이 매개 변수는 초기화되지 않은 것으로 처리됩니다.

반환

destination이 출력을 받을 충분한 크기이면 true, 아니면 false입니다.

예외

키를 내보낼 수 없습니다.

설명

PBKDF2(암호 기반 키 파생 함수 2)를 사용하는 알고리즘을 나타내는 경우 pbeParameters 암호는 UTF-8 인코딩을 통해 바이트로 변환됩니다.

          A PEM-encoded PKCS#8 EncryptedPrivateKeyInfo will begin with
        `-----BEGIN ENCRYPTED PRIVATE KEY-----` and end with
        `-----END ENCRYPTED PRIVATE KEY-----`, with the base64 encoded DER
          contents of the key between the PEM boundaries.

          The PEM is encoded according to the IETF RFC 7468 "strict"
          encoding rules.

적용 대상