C# Class modauthtkt.HashHelper

显示文件 Open project: AppliedIS/csharp_auth_tkt

Public Methods

Method Description
Hash ( string text, HashAlgorithm hasher, Encoding encoder = null ) : string

Creates a hash string using the specified hash methodology.

Default encoding is ISO-8859-1

Hash ( string text, HashType hashType, Encoding encoder = null ) : string

Creates a hash string using the specified hash methodology.

Default encoding is ISO-8859-1

Private Methods

Method Description
BytesToString ( IEnumerable bytes ) : string

Method Details

Hash() public static method

Creates a hash string using the specified hash methodology.
Default encoding is ISO-8859-1
public static Hash ( string text, HashAlgorithm hasher, Encoding encoder = null ) : string
text string String to be hashed
hasher System.Security.Cryptography.HashAlgorithm Hash algorithm with which to perform the hash
encoder System.Text.Encoding (Optional) Character encoding for converting the text string to bytes
return string

Hash() public static method

Creates a hash string using the specified hash methodology.
Default encoding is ISO-8859-1
public static Hash ( string text, HashType hashType, Encoding encoder = null ) : string
text string String to be hashed
hashType HashType Type of hashing to perform
encoder System.Text.Encoding (Optional) Character encoding for converting the text string to bytes
return string