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

Pkcs5Scheme2PbeKey

public class Pkcs5Scheme2PbeKey : CmsPbeKey
PKCS5 scheme-2 - password converted to bytes assuming ASCII.
public Pkcs5Scheme2PbeKey(char[] password, byte[] salt, int iterationCount)

public Pkcs5Scheme2PbeKey(char[] password, AlgorithmIdentifier keyDerivationAlgorithm)

public Pkcs5Scheme2PbeKey(ReadOnlySpan<char> password, ReadOnlySpan<byte> salt, int iterationCount)

public Pkcs5Scheme2PbeKey(ReadOnlySpan<char> password, AlgorithmIdentifier keyDerivationAlgorithm)