다음을 통해 공유


DSA.ImportFromEncryptedPem 메서드

정의

오버로드

ImportFromEncryptedPem(ReadOnlySpan<Char>, ReadOnlySpan<Byte>)

암호화된 RFC 7468 PEM으로 인코딩된 프라이빗 키를 가져와 이 개체의 키를 바꿉니다.

ImportFromEncryptedPem(ReadOnlySpan<Char>, ReadOnlySpan<Char>)

암호화된 RFC 7468 PEM으로 인코딩된 프라이빗 키를 가져와 이 개체의 키를 바꿉니다.

ImportFromEncryptedPem(ReadOnlySpan<Char>, ReadOnlySpan<Byte>)

Source:
DSA.cs
Source:
DSA.cs
Source:
DSA.cs

암호화된 RFC 7468 PEM으로 인코딩된 프라이빗 키를 가져와 이 개체의 키를 바꿉니다.

public:
 override void ImportFromEncryptedPem(ReadOnlySpan<char> input, ReadOnlySpan<System::Byte> passwordBytes);
public override void ImportFromEncryptedPem (ReadOnlySpan<char> input, ReadOnlySpan<byte> passwordBytes);
override this.ImportFromEncryptedPem : ReadOnlySpan<char> * ReadOnlySpan<byte> -> unit
Public Overrides Sub ImportFromEncryptedPem (input As ReadOnlySpan(Of Char), passwordBytes As ReadOnlySpan(Of Byte))

매개 변수

input
ReadOnlySpan<Char>

가져올 암호화된 키의 PEM 텍스트입니다.

passwordBytes
ReadOnlySpan<Byte>

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

예외

input에 인식된 레이블이 있는 PEM으로 인코딩된 키가 포함되어 있지 않습니다.

또는

input 에 인식된 레이블이 있는 PEM으로 인코딩된 키가 여러 개 포함되어 있습니다.

암호가 잘못되었습니다.

        -or-

        The base-64 decoded contents of the PEM text from <code data-dev-comment-type="paramref">input</code> do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure.

        -or-

        The base-64 decoded contents of the PEM text from <code data-dev-comment-type="paramref">input</code> indicate the key is for an algorithm other than the algorithm represented by this instance.

        -or-

        The base-64 decoded contents of the PEM text from <code data-dev-comment-type="paramref">input</code> represent the key in a format that is not supported.

        -or-

        The algorithm-specific key import failed.

설명

암호 바이트는 로 표시된 알고리즘에서 사용하는 KDF(키 파생 함수)로 pbeParameters직접 전달됩니다. 이렇게 하면 PBKDF2(암호 기반 키 파생 함수 2)를 사용하여 암호를 처리할 때 UTF-8 이외의 텍스트 인코딩을 사용하는 다른 시스템과 호환할 수 있습니다.

지원되지 않거나 형식이 잘못된 PEM 인코딩된 개체는 무시됩니다. 지원되는 PEM 레이블이 여러 개 있는 경우 키가 모호할 때 키를 가져오지 못하도록 예외가 throw됩니다.

이 메서드는 PEM 레이블을 ENCRYPTED PRIVATE KEY 지원합니다.

적용 대상

ImportFromEncryptedPem(ReadOnlySpan<Char>, ReadOnlySpan<Char>)

Source:
DSA.cs
Source:
DSA.cs
Source:
DSA.cs

암호화된 RFC 7468 PEM으로 인코딩된 프라이빗 키를 가져와 이 개체의 키를 바꿉니다.

public:
 override void ImportFromEncryptedPem(ReadOnlySpan<char> input, ReadOnlySpan<char> password);
public override void ImportFromEncryptedPem (ReadOnlySpan<char> input, ReadOnlySpan<char> password);
override this.ImportFromEncryptedPem : ReadOnlySpan<char> * ReadOnlySpan<char> -> unit
Public Overrides Sub ImportFromEncryptedPem (input As ReadOnlySpan(Of Char), password As ReadOnlySpan(Of Char))

매개 변수

input
ReadOnlySpan<Char>

가져올 암호화된 키의 PEM 텍스트입니다.

password
ReadOnlySpan<Char>

키 자료의 암호를 해독하는 데 사용할 암호입니다.

예외

input에 인식된 레이블이 있는 PEM으로 인코딩된 키가 포함되어 있지 않습니다.

또는

input 에 인식된 레이블이 있는 PEM으로 인코딩된 키가 여러 개 포함되어 있습니다.

암호가 잘못되었습니다.

        -or-

        The base-64 decoded contents of the PEM text from <code data-dev-comment-type="paramref">input</code> do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure.

        -or-

        The base-64 decoded contents of the PEM text from <code data-dev-comment-type="paramref">input</code> indicate the key is for an algorithm other than the algorithm represented by this instance.

        -or-

        The base-64 decoded contents of the PEM text from <code data-dev-comment-type="paramref">input</code> represent the key in a format that is not supported.

        -or-

        The algorithm-specific key import failed.

설명

input 기본 64 디코딩 콘텐츠가 PBKDF1(암호 기반 키 파생 함수 1) 또는 PBKDF2(암호 기반 키 파생 함수 2)를 사용하는 알고리즘을 나타내는 경우 암호는 UTF-8 인코딩을 통해 바이트로 변환됩니다.

지원되지 않거나 형식이 잘못된 PEM 인코딩된 개체는 무시됩니다. 지원되는 PEM 레이블이 여러 개 있는 경우 키가 모호할 때 키를 가져오지 못하도록 예외가 throw됩니다.

이 메서드는 PEM 레이블을 ENCRYPTED PRIVATE KEY 지원합니다.

적용 대상