C# Class SpeakFriend.Utilities.LoginUtils

Show file Open project: teamaton/speak-lib

Public Properties

Property Type Description
MandatoryChars char[][]

Public Methods

Method Description
CreateRandomPassword ( int PasswordLength ) : string
GetNextUsername ( ISession session, Type userType, string nameColumn ) : string

Returns the next available username based on the last entries in the DB.

GetPasswordHash ( string password ) : string

Converts the given Password to an md5 Hash

GetRandomPassword ( ) : string
IsPasswordOk ( string password ) : bool
IsValidPassword ( string userInput, string hashedMd5 ) : bool

Returns true, if the given string string has the same hash, as the stored database value.

Method Details

CreateRandomPassword() public static method

public static CreateRandomPassword ( int PasswordLength ) : string
PasswordLength int
return string

GetNextUsername() public static method

Returns the next available username based on the last entries in the DB.
public static GetNextUsername ( ISession session, Type userType, string nameColumn ) : string
session ISession
userType System.Type
nameColumn string
return string

GetPasswordHash() public static method

Converts the given Password to an md5 Hash
public static GetPasswordHash ( string password ) : string
password string
return string

GetRandomPassword() public static method

public static GetRandomPassword ( ) : string
return string

IsPasswordOk() public static method

public static IsPasswordOk ( string password ) : bool
password string
return bool

IsValidPassword() public static method

Returns true, if the given string string has the same hash, as the stored database value.
public static IsValidPassword ( string userInput, string hashedMd5 ) : bool
userInput string
hashedMd5 string
return bool

Property Details

MandatoryChars public static property

public static char[][] MandatoryChars
return char[][]