C# 클래스 OpenResKit.ODataHost.PasswordHash

Salted password hashing with PBKDF2-SHA1. Author: havoc AT defuse.ca www: http://crackstation.net/hashing-security.htm Compatibility: .NET 3.0 and later.
파일 보기 프로젝트 열기: htw-bui/OrkHub

공개 메소드들

메소드 설명
CreateHash ( string password ) : string

Creates a salted PBKDF2 hash of the password.

ValidatePassword ( string password, string correctHash ) : bool

Validates a password given a hash of the correct one.

비공개 메소드들

메소드 설명
PBKDF2 ( string password, byte salt, int iterations, int outputBytes ) : byte[]

Computes the PBKDF2-SHA1 hash of a password.

SlowEquals ( byte a, byte b ) : bool

Compares two byte arrays in length-constant time. This comparison method is used so that password hashes cannot be extracted from on-line systems using a timing attack and then attacked off-line.

메소드 상세

CreateHash() 공개 정적인 메소드

Creates a salted PBKDF2 hash of the password.
public static CreateHash ( string password ) : string
password string The password to hash.
리턴 string

ValidatePassword() 공개 정적인 메소드

Validates a password given a hash of the correct one.
public static ValidatePassword ( string password, string correctHash ) : bool
password string The password to check.
correctHash string A hash of the correct password.
리턴 bool