C# 클래스 App.Security.PasswordHash

An utility class for salted password hashing with PBKDF2-SHA1
파일 보기 프로젝트 열기: kriasoft/site-sdk

공개 메소드들

메소드 설명
Create ( string password ) : PasswordHash

Creates a salted PBKDF2 hash of the password.

Validate ( string password, byte hash, byte salt ) : bool

Validates a password against given hash and salt.

비공개 메소드들

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

PBKDF2 ( string password, byte salt, int iterations, int outputBytes ) : byte[]

Computes the PBKDF2-SHA1 hash of a password.

PasswordHash ( byte hash, byte salt ) : System.Security.Cryptography

Initializes a new instance of the PasswordHash class.

메소드 상세

Create() 공개 정적인 메소드

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

Validate() 공개 정적인 메소드

Validates a password against given hash and salt.
public static Validate ( string password, byte hash, byte salt ) : bool
password string The password to check.
hash byte A hash of the correct password.
salt byte A salt of the correct password.
리턴 bool