C# Class BrockAllen.MembershipReboot.DefaultCrypto

Inheritance: ICrypto
Show file Open project: brockallen/BrockAllen.MembershipReboot

Public Methods

Method Description
DecodeIterations ( string prefix ) : int
EncodeIterations ( int count ) : string
GenerateNumericCode ( int digits ) : string
GenerateSalt ( ) : string
GetCurrentYear ( ) : int
GetIterationsFromYear ( int year ) : int
Hash ( string value ) : string
Hash ( string value, string key ) : string
HashPassword ( string password, int iterations ) : string
SlowEquals ( string a, string b ) : bool
VerifyHash ( string value, string hash ) : bool
VerifyHash ( string value, string key, string hash ) : bool
VerifyHashedPassword ( string hashedPassword, string password ) : bool

Private Methods

Method Description
SlowEqualsInternal ( string a, string b ) : bool

Method Details

DecodeIterations() public method

public DecodeIterations ( string prefix ) : int
prefix string
return int

EncodeIterations() public method

public EncodeIterations ( int count ) : string
count int
return string

GenerateNumericCode() public method

public GenerateNumericCode ( int digits ) : string
digits int
return string

GenerateSalt() public method

public GenerateSalt ( ) : string
return string

GetCurrentYear() public method

public GetCurrentYear ( ) : int
return int

GetIterationsFromYear() public method

public GetIterationsFromYear ( int year ) : int
year int
return int

Hash() public method

public Hash ( string value ) : string
value string
return string

Hash() public method

public Hash ( string value, string key ) : string
value string
key string
return string

HashPassword() public method

public HashPassword ( string password, int iterations ) : string
password string
iterations int
return string

SlowEquals() public method

public SlowEquals ( string a, string b ) : bool
a string
b string
return bool

VerifyHash() public method

public VerifyHash ( string value, string hash ) : bool
value string
hash string
return bool

VerifyHash() public method

public VerifyHash ( string value, string key, string hash ) : bool
value string
key string
hash string
return bool

VerifyHashedPassword() public method

public VerifyHashedPassword ( string hashedPassword, string password ) : bool
hashedPassword string
password string
return bool