C# Class JelloScrum.Login.Wachtwoord.PassWordHelper

Helper class for password handling. Use to encrypt passwords and generate salts. Can also be used to generate a phonetic password.
Mostra file Open project: auxilium/JelloScrum

Public Methods

Method Description
EncryptPassWord ( string passWord ) : string

Encrypts the specified password using the MD5 hash algoritm and no salt

EncryptPassWord ( string passWord, HashAlgoritm hashAlgoritm ) : string

Encrypts the specified password using the specified hash algoritm

EncryptPassWord ( string passWord, string salt ) : string

Encrypts the specified password using the MD5 hash algoritm

EncryptPassWord ( string passWord, string salt, HashAlgoritm hashAlgoritm ) : string

Encrypts the specified password using the specified hash algoritm

GenerateAlphanumericPassWord ( ) : string

Generate an alphanumeric password

GenerateAlphanumericPassWord ( int lengte ) : string

Generate an alphanumeric password

GeneratePhoneticPassWord ( ) : string

Generates a phonetic password of 6 characters

GeneratePhoneticPassWord ( int passwordLength ) : string

Generates a phonetic password of specified number of characters

GenerateSalt ( ) : string

Generates a 6 byte salt

GenerateSalt ( int size ) : string

Generates a salt of specified byte size

GenerateSalt ( int minSaltSize, int maxSaltSize ) : string

Generates a salt of a random byte size The minimum and maximum byte sizes are specified.

Private Methods

Method Description
GetRandomNumber ( int bandwith ) : int

Gets a random number within a zero based specfied bandwith

MD5Hash ( string data ) : string

Method Details

EncryptPassWord() public static method

Encrypts the specified password using the MD5 hash algoritm and no salt
public static EncryptPassWord ( string passWord ) : string
passWord string
return string

EncryptPassWord() public static method

Encrypts the specified password using the specified hash algoritm
public static EncryptPassWord ( string passWord, HashAlgoritm hashAlgoritm ) : string
passWord string
hashAlgoritm HashAlgoritm
return string

EncryptPassWord() public static method

Encrypts the specified password using the MD5 hash algoritm
public static EncryptPassWord ( string passWord, string salt ) : string
passWord string
salt string
return string

EncryptPassWord() public static method

Encrypts the specified password using the specified hash algoritm
public static EncryptPassWord ( string passWord, string salt, HashAlgoritm hashAlgoritm ) : string
passWord string
salt string
hashAlgoritm HashAlgoritm
return string

GenerateAlphanumericPassWord() public static method

Generate an alphanumeric password
public static GenerateAlphanumericPassWord ( ) : string
return string

GenerateAlphanumericPassWord() public static method

Generate an alphanumeric password
public static GenerateAlphanumericPassWord ( int lengte ) : string
lengte int
return string

GeneratePhoneticPassWord() public static method

Generates a phonetic password of 6 characters
public static GeneratePhoneticPassWord ( ) : string
return string

GeneratePhoneticPassWord() public static method

Generates a phonetic password of specified number of characters
public static GeneratePhoneticPassWord ( int passwordLength ) : string
passwordLength int
return string

GenerateSalt() public static method

Generates a 6 byte salt
public static GenerateSalt ( ) : string
return string

GenerateSalt() public static method

Generates a salt of specified byte size
public static GenerateSalt ( int size ) : string
size int the salt byte size
return string

GenerateSalt() public static method

Generates a salt of a random byte size The minimum and maximum byte sizes are specified.
public static GenerateSalt ( int minSaltSize, int maxSaltSize ) : string
minSaltSize int minimum salt byte size
maxSaltSize int maximum salt byte size
return string