<PackageReference Include="System.Security.Cryptography.Pkcs" Version="11.0.0-preview.6.26359.118" />

System.Security.Cryptography.Pkcs.Pkcs12KeyBag

public sealed class Pkcs12KeyBag : Pkcs12SafeBag
Represents the KeyBag from PKCS#12, a container whose contents are a PKCS#8 PrivateKeyInfo. This class cannot be inherited.
public ReadOnlyMemory<byte> Pkcs8PrivateKey { get; }

Gets a memory value containing the PKCS#8 PrivateKeyInfo value transported by this bag.

public Pkcs12KeyBag(ReadOnlyMemory<byte> pkcs8PrivateKey, bool skipCopy = false)

Initializes a new instance of the Pkcs12KeyBag from an existing encoded PKCS#8 PrivateKeyInfo value.