Condividi tramite


Pkcs12SafeContents.AddSecret(Oid, ReadOnlyMemory<Byte>) Metodo

Definizione

Aggiunge un valore con codifica ASN.1 BER con un identificatore di tipo specificato a SafeContents tramite un nuovo Pkcs12SecretBag e restituisce l'istanza del contenitore appena creata.

public:
 System::Security::Cryptography::Pkcs::Pkcs12SecretBag ^ AddSecret(System::Security::Cryptography::Oid ^ secretType, ReadOnlyMemory<System::Byte> secretValue);
public System.Security.Cryptography.Pkcs.Pkcs12SecretBag AddSecret (System.Security.Cryptography.Oid secretType, ReadOnlyMemory<byte> secretValue);
member this.AddSecret : System.Security.Cryptography.Oid * ReadOnlyMemory<byte> -> System.Security.Cryptography.Pkcs.Pkcs12SecretBag
Public Function AddSecret (secretType As Oid, secretValue As ReadOnlyMemory(Of Byte)) As Pkcs12SecretBag

Parametri

secretType
Oid

Identificatore di oggetto (OID) che identifica il tipo di dati del valore del segreto.

secretValue
ReadOnlyMemory<Byte>

Valore con codifica BER che rappresenta il segreto da aggiungere.

Restituisce

Istanza del contenitore aggiunta a SafeContents.

Eccezioni

Il valore del parametro secretType è null.

L'istanza è di sola lettura.

Il parametro secretValue non rappresenta un singolo valore con codifica ASN.1 BER.

Si applica a