Method | Description | |
---|---|---|
CheckPassword ( string plaintext, string hashed ) : bool |
Check that a plaintext password matches a previously hashed one.
|
|
GenerateSalt ( ) : string |
Generate a salt for use with the
|
|
GenerateSalt ( int logRounds ) : string |
Generate a salt for use with the BCrypt.HashPassword() method.
|
|
HashPassword ( string password, string salt ) : string |
Hash a password using the OpenBSD bcrypt scheme.
|
Method | Description | |
---|---|---|
CryptRaw ( byte password, byte salt, int logRounds ) : byte[] |
Perform the central password hashing step in the bcrypt scheme.
|
Method | Description | |
---|---|---|
Char64 ( char c ) : int |
Look up the 3 bits base64-encoded by the specified character, range-checking against the conversion table.
|
|
DecodeBase64 ( string s, int maximumLength ) : byte[] |
Decode a string encoded using BCrypt's Base64 scheme to a byte array. Note that this is _not_ compatible with the standard MIME-Base64 encoding.
|
|
EksKey ( byte data, byte key ) : void |
Perform the "enhanced key schedule" step described by Provos and Mazieres in "A Future-Adaptable Password Scheme" (http://www.openbsd.org/papers/bcrypt-paper.ps).
|
|
Encipher ( uint block, int offset ) : void |
Blowfish encipher a single 64-bit block encoded as two 32-bit halves.
|
|
EncodeBase64 ( byte d, int length ) : string |
Encode a byte array using bcrypt's slightly-modified Base64 encoding scheme. Note that this is _not_ compatible with the standard MIME-Base64 encoding.
|
|
InitKey ( ) : void |
Initialize the Blowfish key schedule.
|
|
Key ( byte key ) : void |
Key the Blowfish cipher.
|
|
StreamToWord ( byte data, int &offset ) : uint |
Cycically extract a word of key material.
|
public static CheckPassword ( string plaintext, string hashed ) : bool | ||
plaintext | string | The plaintext password to verify. |
hashed | string | The previously hashed password. |
return | bool |
protected CryptRaw ( byte password, byte salt, int logRounds ) : byte[] | ||
password | byte | The password to hash. |
salt | byte | The binary salt to hash with the /// password. |
logRounds | int | The binary logarithm of the number of /// rounds of hashing to apply. |
return | byte[] |
public static GenerateSalt ( int logRounds ) : string | ||
logRounds | int | The log2 of the number of rounds of /// hashing to apply. The work factor therefore increases as (2 ** /// logRounds). |
return | string |
public static HashPassword ( string password, string salt ) : string | ||
password | string | The password to hash. |
salt | string | The salt to hash with (perhaps generated
/// using |
return | string |