Table of Contents

Class OpenBsdBCrypt

Namespace
Org.BouncyCastle.Crypto.Generators
Assembly
BouncyCastle.Cryptography.dll

Password hashing scheme BCrypt.

public class OpenBsdBCrypt
Inheritance
OpenBsdBCrypt
Inherited Members

Remarks

Designed by Niels Provos and David Mazières, using the string format and the Base64 encoding of the reference implementation in OpenBSD. Passwords are encoded using UTF-8 when provided as char[]. Encoded passwords longer than 72 bytes are truncated and all remaining bytes are ignored.

Constructors

OpenBsdBCrypt()

public OpenBsdBCrypt()

Methods

CheckPassword(string, char[])

public static bool CheckPassword(string bcryptString, char[] password)

Parameters

bcryptString string
password char[]

Returns

bool

Generate(char[], byte[], int)

public static string Generate(char[] password, byte[] salt, int cost)

Parameters

password char[]
salt byte[]
cost int

Returns

string

Generate(string, char[], byte[], int)

public static string Generate(string version, char[] password, byte[] salt, int cost)

Parameters

version string
password char[]
salt byte[]
cost int

Returns

string