C# 클래스 GSF.Security.PBKDF2

Implements a generic PBKDF2 DeriveBytes that will work from a custom cryptographic transform. Rfc2898DeriveBytes only implements a SHA-1 underlying hash function.
It is recommended to use one of the HMAC-SHA implementations unless you understand the implecations of using something differently.
상속: System.Security.Cryptography.DeriveBytes
파일 보기 프로젝트 열기: GridProtectionAlliance/openHistorian

공개 메소드들

메소드 설명
ComputeSaltedPassword ( HMACMethod method, byte password, byte salt, int iterations, int length ) : byte[]

Implements a PBKDF2 algorthim with a user definded MAC method.

GetBytes ( int length ) : byte[]

When overridden in a derived class, returns pseudo-random key bytes.

PBKDF2 ( HMACMethod method, byte password, byte salt, int iterations ) : System

Implements a PBKDF2 algorthim with a user definded MAC method.

Reset ( ) : void

When overridden in a derived class, resets the state of the operation.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

When overridden in a derived class, releases the unmanaged resources used by the T:System.Security.Cryptography.DeriveBytes class and optionally releases the managed resources.

비공개 메소드들

메소드 설명
ComputeNextBlock ( ) : void

Computes the next block of crypto bytes.

ComputeNextBlock ( HMac hash ) : void
Initialize ( HMac hash, byte passwordBytes, byte salt, int iterations ) : void

메소드 상세

ComputeSaltedPassword() 공개 정적인 메소드

Implements a PBKDF2 algorthim with a user definded MAC method.
public static ComputeSaltedPassword ( HMACMethod method, byte password, byte salt, int iterations, int length ) : byte[]
method HMACMethod the HMAC method to use.
password byte the password to use
salt byte the salt. Must be at least 64-bit
iterations int the number of iterations. Must be at least 1000
length int the number of bytes to return
리턴 byte[]

Dispose() 보호된 메소드

When overridden in a derived class, releases the unmanaged resources used by the T:System.Security.Cryptography.DeriveBytes class and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
리턴 void

GetBytes() 공개 메소드

When overridden in a derived class, returns pseudo-random key bytes.
public GetBytes ( int length ) : byte[]
length int
리턴 byte[]

PBKDF2() 공개 메소드

Implements a PBKDF2 algorthim with a user definded MAC method.
public PBKDF2 ( HMACMethod method, byte password, byte salt, int iterations ) : System
method HMACMethod the HMAC method to use.
password byte the password to use
salt byte the salt. recommended to be at least 64-bit
iterations int the number of iterations. Recommended to be at least 1000
리턴 System

Reset() 공개 메소드

When overridden in a derived class, resets the state of the operation.
public Reset ( ) : void
리턴 void