C# 클래스 Candor.Security.Cryptography.SHA2HashProvider

A cryptographic hash provider based on the SHA256Managed algorithm.
상속: HashProvider
파일 보기 프로젝트 열기: michael-lang/candor-common 1 사용 예제들

공개 메소드들

메소드 설명
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