IGLib  1.6.0
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
IG.Crypto.PasswordAlgorithmDeriveBytes Class Reference

Key generation algorithm that uses a Rfc2898DeriveBytes object (PBKDF2 algorithm). More...

+ Inheritance diagram for IG.Crypto.PasswordAlgorithmDeriveBytes:
+ Collaboration diagram for IG.Crypto.PasswordAlgorithmDeriveBytes:

Public Member Functions

 PasswordAlgorithmDeriveBytes ()
 
 PasswordAlgorithmDeriveBytes (bool publicParameters)
 
- Public Member Functions inherited from IG.Crypto.PasswordAlgorithmBase
virtual void Init (bool publicParameters=false)
 Clears all data and resets the passwords/keys/salts generation algorithm. More...
 
virtual void Reset ()
 Resets the password/key generator (Clears its parameters and sets the initialization flag IsInitialized to false). More...
 
virtual void Init (string password, byte[] salt, int numIterations)
 
virtual void Init (byte[] password, byte[] salt, int numIterations)
 
string GetPasswordString ()
 If the generator has public parameters (flag IsParametersPublic) then the password string is returned. Otherwise, an InvalidOperationException is thrown. More...
 
byte[] GetPasswordBytes ()
 If the generator has public parameters (flag IsParametersPublic) then the password in form of a byte array is returned. Otherwise, an InvalidOperationException is thrown. More...
 
string GetSaltString ()
 If the generator has public parameters (flag IsParametersPublic) then the salt string is returned. Otherwise, an InvalidOperationException is thrown. More...
 
byte[] GetSaltBytes ()
 If the generator has public parameters (flag IsParametersPublic) then the salt in form of a byte array is returned. Otherwise, an InvalidOperationException is thrown. More...
 
int GetNuIterations ()
 If the generator has public parameters (flag IsParametersPublic) then the number of iterations is returned. Otherwise, an InvalidOperationException is thrown. More...
 
byte[] GetLastGeneratedBytes ()
 If the generator has public parameters (flag IsParametersPublic) then the last generated key in form of a byte array is returned. Otherwise, an InvalidOperationException is thrown. More...
 
int GetNuGenerations ()
 Returns the number of keys (byte sequences) generated until now. More...
 
void GetBytes (int numBytes, ref byte[] outputBytes)
 Creates and stores the next generated key of the specified length. More...
 
byte[] GetBytes (int numBytes)
 Creates and returns the next generated key of the specified length by calling GetBytes(int, ref byte[]). More...
 

Protected Member Functions

override void InitializeExternalAlgorithm ()
 Initializes eventual external algorithm used as proxy object to perform operations. More...
 
override void ClearExternalAlgorithm ()
 Clears eventual external algorithm used as proxy object to perform operations. More...
 
override void GetBytesInternal (int numBytes, ref byte[] outputBytes)
 Returns the next generated key of the specified length. More...
 
- Protected Member Functions inherited from IG.Crypto.PasswordAlgorithmBase
 PasswordAlgorithmBase (bool publicParameters=false)
 

Properties

PasswordDeriveBytes ExternalAlgorithm [get, set]
 External algoritgm that will do the job. More...
 
- Properties inherited from IG.Crypto.PasswordAlgorithmBase
bool IsParametersPublic [get, protected set]
 Flag that specifies whether initialization parameters of the algorithm can be queried or not. More...
 
bool IsInitialized [get, set]
 Flag that specifies whether the algorithm has been initialized. More...
 
string PasswordString [get, set]
 Password, in form of string, to be used in generation of keys, initialization vectors, etc. More...
 
byte[] PasswordBytes [get, set]
 Password, in form of byte array, to be used in generation of keys, initialization vectors, etc. More...
 
string SaltString [get, set]
 Salt, in form of byte array, to be used in generation of keys, initialization vectors, etc. More...
 
byte[] SaltBytes [get, set]
 Salt, in form of byte array, to be used in generation of keys, initialization vectors, etc. More...
 
int NumIterations [get, set]
 Number of iteration used when generating keys. More...
 
byte[] LastGeneratedBytes [get, set]
 Last value of the generated bytes. More...
 
int NumGenerations [get, set]
 Number of generated keys (byte sequences) up to now. More...
 

Private Attributes

PasswordDeriveBytes _externalAlgorithm
 

Additional Inherited Members

- Protected Attributes inherited from IG.Crypto.PasswordAlgorithmBase
int _numIterations = 0
 
int _numGenerations = 0
 

Detailed Description

Key generation algorithm that uses a Rfc2898DeriveBytes object (PBKDF2 algorithm).

$A Igor Jun15;

Constructor & Destructor Documentation

IG.Crypto.PasswordAlgorithmDeriveBytes.PasswordAlgorithmDeriveBytes ( )
inline
IG.Crypto.PasswordAlgorithmDeriveBytes.PasswordAlgorithmDeriveBytes ( bool  publicParameters)
inline

Member Function Documentation

override void IG.Crypto.PasswordAlgorithmDeriveBytes.InitializeExternalAlgorithm ( )
inlineprotectedvirtual

Initializes eventual external algorithm used as proxy object to perform operations.

Implements IG.Crypto.PasswordAlgorithmBase.

override void IG.Crypto.PasswordAlgorithmDeriveBytes.ClearExternalAlgorithm ( )
inlineprotectedvirtual

Clears eventual external algorithm used as proxy object to perform operations.

Implements IG.Crypto.PasswordAlgorithmBase.

override void IG.Crypto.PasswordAlgorithmDeriveBytes.GetBytesInternal ( int  numBytes,
ref byte[]  outputBytes 
)
inlineprotectedvirtual

Returns the next generated key of the specified length.

WARNING: This algorithm is weaker than the PasswordAlgorithmRfc2898.

Implements IG.Crypto.PasswordAlgorithmBase.

Member Data Documentation

PasswordDeriveBytes IG.Crypto.PasswordAlgorithmDeriveBytes._externalAlgorithm
private

Property Documentation

PasswordDeriveBytes IG.Crypto.PasswordAlgorithmDeriveBytes.ExternalAlgorithm
getsetprotected

External algoritgm that will do the job.


The documentation for this class was generated from the following file: