C# Class Crypto.OpenSslCompatDeriveBytes

Derives a key from a password using an OpenSSL-compatible version of the PBKDF1 algorithm.
based on the OpenSSL EVP_BytesToKey method for generating key and iv http://www.openssl.org/docs/crypto/EVP_BytesToKey.html
Inheritance: System.Security.Cryptography.DeriveBytes
Exibir arquivo Open project: jgcoding/J-SQL Class Usage Examples

Public Methods

Method Description
GetBytes ( int cb ) : byte[]

Returns a pseudo-random key from a password, salt and iteration count.

OpenSslCompatDeriveBytes ( byte password, byte salt, string hashName, int iterations ) : System

Initializes a new instance of the Crypto.OpenSslCompatDeriveBytes class specifying the password, key salt, hash name, and iterations to use to derive the key.

OpenSslCompatDeriveBytes ( string password, byte salt, string hashName, int iterations ) : System

Initializes a new instance of the Crypto.OpenSslCompatDeriveBytes class specifying the password, key salt, hash name, and iterations to use to derive the key.

Reset ( ) : void

Resets the state of the operation.

Method Details

GetBytes() public method

Returns a pseudo-random key from a password, salt and iteration count.
public GetBytes ( int cb ) : byte[]
cb int The number of pseudo-random key bytes to generate.
return byte[]

OpenSslCompatDeriveBytes() public method

Initializes a new instance of the Crypto.OpenSslCompatDeriveBytes class specifying the password, key salt, hash name, and iterations to use to derive the key.
public OpenSslCompatDeriveBytes ( byte password, byte salt, string hashName, int iterations ) : System
password byte The password for which to derive the key.
salt byte The key salt to use to derive the key.
hashName string The name of the hash algorithm for the operation. (e.g. MD5 or SHA1)
iterations int The number of iterations for the operation.
return System

OpenSslCompatDeriveBytes() public method

Initializes a new instance of the Crypto.OpenSslCompatDeriveBytes class specifying the password, key salt, hash name, and iterations to use to derive the key.
public OpenSslCompatDeriveBytes ( string password, byte salt, string hashName, int iterations ) : System
password string The password for which to derive the key.
salt byte The key salt to use to derive the key.
hashName string The name of the hash algorithm for the operation. (e.g. MD5 or SHA1)
iterations int The number of iterations for the operation.
return System

Reset() public method

Resets the state of the operation.
public Reset ( ) : void
return void