C# Class Web.Models.Authenticator

Show file Open project: daxko/Usablog Class Usage Examples

Public Methods

Method Description
Create ( string email, string password ) : User
Hash ( string rawPassword, byte salt ) : string
PasswordsMatch ( string rawPassword, string hashedPassword, byte salt ) : bool

Private Methods

Method Description
BuildRandomSalt ( ) : byte[]
DoHash ( string password, byte salt ) : byte[]

Method Details

Create() public method

public Create ( string email, string password ) : User
email string
password string
return User

Hash() public method

public Hash ( string rawPassword, byte salt ) : string
rawPassword string
salt byte
return string

PasswordsMatch() public method

public PasswordsMatch ( string rawPassword, string hashedPassword, byte salt ) : bool
rawPassword string
hashedPassword string
salt byte
return bool