Method | Description | |
---|---|---|
GenerateSalt ( ) : string |
Generate a salt for use with the BCrypt.HashPassword(string,string) method selecting a reasonable default for the number of hashing rounds to apply.
|
|
GenerateSalt ( int workFactor ) : string |
Generate a salt for use with the BCrypt.HashPassword(string,string) method.
|
|
HashPassword ( string input ) : string |
Hash a password using the OpenBSD bcrypt scheme and a salt generated by
|
|
HashPassword ( string input, int workFactor ) : string |
Hash a password using the OpenBSD bcrypt scheme and a salt generated by
|
|
HashPassword ( string input, string salt ) : string |
Hash a password using the OpenBSD bcrypt scheme.
|
|
HashString ( string source ) : string |
Hash a string using the OpenBSD bcrypt scheme and a salt generated by Just an alias for HashPassword. |
|
HashString ( string source, int workFactor ) : string |
Hash a string using the OpenBSD bcrypt scheme and a salt generated by Just an alias for HashPassword. |
|
Verify ( string text, string hash ) : bool |
Verifies that the hash of the given text matches the provided hash
|
Method | Description | |
---|---|---|
Char64 ( char character ) : int |
Look up the 3 bits base64-encoded by the specified character, range-checking against conversion table.
|
|
CryptRaw ( byte inputBytes, byte saltBytes, int logRounds ) : byte[] |
Perform the central hashing step in the bcrypt scheme.
|
|
DecodeBase64 ( string encodedstring, int maximumBytes ) : 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 saltBytes, byte inputBytes ) : 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 blockArray, int offset ) : void |
Blowfish encipher a single 64-bit block encoded as two 32-bit halves.
|
|
EncodeBase64 ( byte byteArray, 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.
|
|
InitializeKey ( ) : void |
Initializes the Blowfish key schedule.
|
|
Key ( byte keyBytes ) : void |
Key the Blowfish cipher.
|
|
StreamToWord ( byte data, int &offset ) : uint |
Cycically extract a word of key material.
|
public static GenerateSalt ( int workFactor ) : string | ||
workFactor | int | The log2 of the number of rounds of hashing to apply - the work /// factor therefore increases as 2**workFactor. |
return | string |
public static HashPassword ( string input ) : string | ||
input | string | The password to hash. |
return | string |
public static HashPassword ( string input, int workFactor ) : string | ||
input | string | The password to hash. |
workFactor | int | The log2 of the number of rounds of hashing to apply - the work /// factor therefore increases as 2^workFactor. |
return | string |
public static HashPassword ( string input, string salt ) : string | ||
input | string | The password to hash. |
salt | string | the salt to hash with (perhaps generated using BCrypt.gensalt). |
return | string |
public static HashString ( string source ) : string | ||
source | string | The string to hash. |
return | string |
public static HashString ( string source, int workFactor ) : string | ||
source | string | The string to hash. |
workFactor | int | The log2 of the number of rounds of hashing to apply - the work /// factor therefore increases as 2^workFactor. |
return | string |
public static Verify ( string text, string hash ) : bool | ||
text | string | The text to verify. |
hash | string | The previously-hashed password. |
return | bool |