ECDiffieHellman.ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>, Int32) Método

Definição

Importa a chave pública de uma estrutura de SubjectPublicKeyInfo X.509 após a descriptografia, substituindo as chaves desse objeto.Imports the public key from an X.509 SubjectPublicKeyInfo structure after decryption, replacing the keys for this object.

public:
 override void ImportSubjectPublicKeyInfo(ReadOnlySpan<System::Byte> source, [Runtime::InteropServices::Out] int % bytesRead);
public override void ImportSubjectPublicKeyInfo (ReadOnlySpan<byte> source, out int bytesRead);
override this.ImportSubjectPublicKeyInfo : ReadOnlySpan<byte> * int -> unit
Public Overrides Sub ImportSubjectPublicKeyInfo (source As ReadOnlySpan(Of Byte), ByRef bytesRead As Integer)

Parâmetros

source
ReadOnlySpan<Byte>

Os bytes de uma estrutura de SubjectPublicKeyInfo X.509 na codificação ASN.1-DER.The bytes of an X.509 SubjectPublicKeyInfo structure in the ASN.1-DER encoding.

bytesRead
Int32

Quando é retornado, este método contém um valor que indica o número de bytes lidos de source.When this method returns, contains a value that indicates the number of bytes read from source. Esse parâmetro é tratado como não inicializado.This parameter is treated as uninitialized.

Exceções

O conteúdo de source não representa uma estrutura de SubjectPublicKeyInfo X.509 codificada por ASN.1-DER.The contents of source do not represent an ASN.1-DER-encoded X.509 SubjectPublicKeyInfo structure.

- ou --or-

O conteúdo de source indica que a chave é de um algoritmo que não é aquele representado por essa instância.The contents of source indicate the key is for an algorithm other than the algorithm represented by this instance.

- ou --or-

O conteúdo de source representa a chave em um formato sem suporte.The contents of source represent the key in a format that is not supported.

- ou --or-

Falha na importação da chave específica do algoritmo.The algorithm-specific key import failed.

Comentários

Esse método dá suporte apenas à codificação binary (DER) de SubjectPublicKeyInfo.This method only supports the binary (DER) encoding of SubjectPublicKeyInfo. Se o valor for codificado em base64 ou no formato de texto PEM, o chamador deverá decodificar o conteúdo em base64 antes de chamar esse método.If the value is Base64-encoded or in the PEM text format, the caller must Base64-decode the contents before calling this method.

Aplica-se a