Redigera

Dela via


Pkcs12CertBag(Oid, ReadOnlyMemory<Byte>) Constructor

Definition

Initializes a new instance of the Pkcs12CertBag class using the specified certificate type and encoding.

public:
 Pkcs12CertBag(System::Security::Cryptography::Oid ^ certificateType, ReadOnlyMemory<System::Byte> encodedCertificate);
public Pkcs12CertBag (System.Security.Cryptography.Oid certificateType, ReadOnlyMemory<byte> encodedCertificate);
new System.Security.Cryptography.Pkcs.Pkcs12CertBag : System.Security.Cryptography.Oid * ReadOnlyMemory<byte> -> System.Security.Cryptography.Pkcs.Pkcs12CertBag
Public Sub New (certificateType As Oid, encodedCertificate As ReadOnlyMemory(Of Byte))

Parameters

certificateType
Oid

The Object Identifier (OID) for the certificate type.

encodedCertificate
ReadOnlyMemory<Byte>

The encoded certificate value.

Exceptions

The certificateType parameter is null.

The encodedCertificate parameter does not represent a single ASN.1 BER-encoded value.

Remarks

No validation is done to ensure that the encodedCertificate value is correct for the indicated certificateType.

Note that for X.509 public-key certificates, the correct encoding for a CertBag value is to wrap the DER-encoded certificate in an OCTET STRING.

Applies to