<PackageReference Include="BouncyCastle.Cryptography" Version="2.7.0" />

Org.BouncyCastle.Pkcs.Pkcs12Entry

public abstract class Pkcs12Entry
Base class for PKCS#12 bag entries (private keys and certificates) carrying optional PKCS#9 bag attributes such as friendly name and local key identifier.

Gets the object identifiers of all bag attributes on this entry.

public bool HasFriendlyName { get; }

Returns true if this entry has a PKCS#9 friendly name attribute.

public Asn1Encodable this[DerObjectIdentifier oid] { get; }

Gets the bag attribute value for the given object identifier, or null if absent.

public void SetFriendlyName(string friendlyName)

Sets or replaces the PKCS#9 friendly name bag attribute on this entry.

public bool TryGetAttribute(DerObjectIdentifier oid, out Asn1Encodable attribute)

Attempts to retrieve a bag attribute by OID.