C# Класс Candor.Security.Cryptography.SHA2HashProvider

A cryptographic hash provider based on the SHA256Managed algorithm.
Наследование: HashProvider
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
GetSalt ( int length ) : string

Creates a true random salt.

Hash ( string salt, string originalValue, int iterations ) : string

Creates a non-reversible hashed value consistently given the same input.

SHA2HashProvider ( ) : System

Constructor for xml file configuration (web.config, app.config).

SHA2HashProvider ( string name ) : System

Constructor for code configuration.

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

Метод Описание
BytesToHex ( Byte toConvert ) : String
Sha256Hex ( String stringToHash ) : String

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

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

Creates a true random salt.
public GetSalt ( int length ) : string
length int length of the salt to return
Результат string

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

Creates a non-reversible hashed value consistently given the same input.
public Hash ( string salt, string originalValue, int iterations ) : string
salt string Another semi-secret value paired with the secret to /// make it more difficult to dictionary attack a collection of hashed values.
originalValue string The original value to keep secret.
iterations int The iterations to hash the originalValue and salt.
Результат string

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

Constructor for xml file configuration (web.config, app.config).
public SHA2HashProvider ( ) : System
Результат System

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

Constructor for code configuration.
public SHA2HashProvider ( string name ) : System
name string
Результат System