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

PasswordConverter

public sealed class PasswordConverter : ICharToByteConverter
Standard char[] to byte[] converters for password based derivation algorithms.
public static readonly ICharToByteConverter Ascii

Do a straight char[] to 8 bit conversion.

public static readonly ICharToByteConverter Pkcs12

Do char[] to BMP conversion (i.e. 2 bytes per character).

public static readonly ICharToByteConverter Utf8

Do a char[] conversion by producing UTF-8 data.

public string Name { get; }

public byte[] Convert(char[] password)