C# Класс Aqueduct.Utils.HashService

Hash a plain string with given salt and compare the hashed strings with plain text.
Показать файл Открыть проект

Открытые методы

Метод Описание
ComputeBase64Hash ( string plainText, string salt ) : string

hashes the given string with given salt to base 64 string

ComputeHash ( string plainText, string salt ) : string

hashes the given string with given salt to base 64 string

ComputeHexadecimalStringHash ( string plainText, string salt ) : string

hashes the given string with given salt to hexadecimal string

HashService ( ) : System

Default constructor that creates defaul hash algorithm to use

HashService ( HashAlgorithm hashAlgorithm ) : System

Constractor to pass a hash algorithm to using in hashing process

VerifyHash ( string plainText, string hashValue, string salt ) : bool

Verifies if the hashValue is hashed form of plainText with given salt

Приватные методы

Метод Описание
GetHashBytes ( string plainText, string salt ) : byte[]

Описание методов

ComputeBase64Hash() публичный Метод

hashes the given string with given salt to base 64 string
public ComputeBase64Hash ( string plainText, string salt ) : string
plainText string plain text to be hashed
salt string Salt that will be used in hashing
Результат string

ComputeHash() публичный Метод

hashes the given string with given salt to base 64 string
public ComputeHash ( string plainText, string salt ) : string
plainText string plain text to be hashed
salt string Salt that will be used in hashing
Результат string

ComputeHexadecimalStringHash() публичный Метод

hashes the given string with given salt to hexadecimal string
public ComputeHexadecimalStringHash ( string plainText, string salt ) : string
plainText string plain text to be hashed
salt string Salt that will be used in hashing
Результат string

HashService() публичный Метод

Default constructor that creates defaul hash algorithm to use
public HashService ( ) : System
Результат System

HashService() публичный Метод

Constractor to pass a hash algorithm to using in hashing process
public HashService ( HashAlgorithm hashAlgorithm ) : System
hashAlgorithm System.Security.Cryptography.HashAlgorithm
Результат System

VerifyHash() публичный Метод

Verifies if the hashValue is hashed form of plainText with given salt
public VerifyHash ( string plainText, string hashValue, string salt ) : bool
plainText string Plain text to be verified
hashValue string Hash value to be verified
salt string Salt that will be used in hashing
Результат bool