<PackageReference Include="BouncyCastle.Cryptography" Version="2.8.0-beta.349" />

Org.BouncyCastle.Cms.CmsPbeKey

public abstract class CmsPbeKey : ICipherParameters
Base class for password-based keys used with CMS enveloped-data recipients. Passed to AddPasswordRecipient.
public string Algorithm { get; }

Gets the key algorithm name (PKCS5S2).

public string Format { get; }

Gets the encoding format name (RAW).

public int IterationCount { get; }

Gets the PBKDF2 iteration count.

public byte[] Salt { get; }

Gets a copy of the PBKDF2 salt.

public CmsPbeKey(char[] password, byte[] salt, int iterationCount)

Creates a PBE key from explicit password, salt, and iteration count.

public CmsPbeKey(char[] password, AlgorithmIdentifier keyDerivationAlgorithm)

Creates a PBE key from a password and PBKDF2 AlgorithmIdentifier.

public byte[] GetEncoded()

Returns null; raw encoding is not supported.