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
Показать файл Открыть проект

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

Метод Описание
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