System.Security.Cryptography.Pkcs.Pkcs12SafeContents
Represents a PKCS#12 SafeContents value. This class cannot be inherited.
Gets a value that indicates the type of encryption applied to the contents.
Gets a value that indicates whether this instance in a read-only state.
public Pkcs12SafeContents()
Initializes a new instance of the Pkcs12SafeContents class.
Adds a certificate to the SafeContents via a new Pkcs12CertBag and returns the newly created bag instance.
Adds an asymmetric private key to the SafeContents via a new Pkcs12KeyBag and returns the newly created bag instance.
Adds a nested SafeContents to the SafeContents via a new Pkcs12SafeContentsBag and returns the newly created bag instance.
Adds a SafeBag to the SafeContents.
Adds an ASN.1 BER-encoded value with a specified type identifier to the SafeContents via a new Pkcs12SecretBag and returns the newly created bag instance.
public Pkcs12ShroudedKeyBag AddShroudedKey(AsymmetricAlgorithm key, byte[] passwordBytes, PbeParameters pbeParameters)
Adds an encrypted asymmetric private key to the SafeContents via a new Pkcs12ShroudedKeyBag from a byte-based password in an array and returns the newly created bag instance.
public Pkcs12ShroudedKeyBag AddShroudedKey(AsymmetricAlgorithm key, ReadOnlySpan<byte> passwordBytes, PbeParameters pbeParameters)
Adds an encrypted asymmetric private key to the SafeContents via a new Pkcs12ShroudedKeyBag from a byte-based password in a span and returns the newly created bag instance.
public Pkcs12ShroudedKeyBag AddShroudedKey(AsymmetricAlgorithm key, string password, PbeParameters pbeParameters)
Adds an encrypted asymmetric private key to the SafeContents via a new Pkcs12ShroudedKeyBag from a character-based password in a string and returns the newly created bag instance.
public Pkcs12ShroudedKeyBag AddShroudedKey(AsymmetricAlgorithm key, ReadOnlySpan<char> password, PbeParameters pbeParameters)
Adds an encrypted asymmetric private key to the SafeContents via a new Pkcs12ShroudedKeyBag from a character-based password in a span and returns the newly created bag instance.
Decrypts the contents of this SafeContents value using a byte-based password from an array.
Decrypts the contents of this SafeContents value using a byte-based password from a span.
Decrypts the contents of this SafeContents value using a character-based password from a string.
Decrypts the contents of this SafeContents value using a character-based password from a span.
Gets an enumerable representation of the SafeBag values contained within the SafeContents.