Pkcs12CertBag Class

Definition

Represents the PKCS#12 CertBag. This class cannot be inherited.

public sealed class Pkcs12CertBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
Inheritance
Pkcs12CertBag

Constructors

Pkcs12CertBag(Oid, ReadOnlyMemory<Byte>)

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

Properties

Attributes

Gets the modifiable collection of attributes to encode with the SafeBag value.

(Inherited from Pkcs12SafeBag)
EncodedBagValue

Gets the ASN.1 BER encoding of the contents of this SafeBag.

(Inherited from Pkcs12SafeBag)
EncodedCertificate

Gets the uninterpreted certificate contents of the CertSafeBag.

IsX509Certificate

Gets a value indicating whether the content type of the encoded certificate value is the X.509 public key certificate content type.

Methods

Encode()

Encodes the SafeBag value and returns it as a byte array.

(Inherited from Pkcs12SafeBag)
Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetBagId()

Gets the Object Identifier (OID) identifying the content type of this SafeBag.

(Inherited from Pkcs12SafeBag)
GetCertificate()

Gets the contents of the CertBag interpreted as an X.509 public key certificate.

GetCertificateType()

Gets the Object Identifier (OID) which identifies the content type of the encoded certificte value.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)
TryEncode(Span<Byte>, Int32)

Attempts to encode the SafeBag value into a provided buffer.

(Inherited from Pkcs12SafeBag)

Applies to

Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.1 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9