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

Org.BouncyCastle.Crypto.Generators.BCrypt

public sealed class BCrypt
public static byte[] Generate(byte[] password, byte[] salt, int cost)

Calculates the bcrypt hash of an input, passing the password bytes through to the EksBlowfishSetup password schedule unchanged.

public static byte[] Generate(byte[] password, byte[] salt, int cost, bool addTerminator)

Calculates the bcrypt hash of an input, optionally appending the bcrypt password terminator (a single 0x00 byte) to password before the EksBlowfishSetup password schedule.

public static byte[] PasswordToByteArray(char[] password)