OpenPetra
Free Administration Software for Non-Profits
Ict.Common.TPasswordHelper Class Reference

Helper Class for dealing with the secure hashing of passwords in OpenPetra. More...

Static Public Member Functions

static IPasswordHashingScheme GetPasswordSchemeHelperForVersion (int AVersion)
 New instance of the Class that implements the specified version of OpenPetra's Password Hashing Scheme ('Factory Pattern'). More...
 
static string GetRandomSecurePassword ()
 Generates a new secure password. More...
 
static string GetRandomToken ()
 return a token for the password reset functionality More...
 
static void LogByteArrayContents (byte[] AArray, string ADescription)
 Logs the decimal representation of a byte array of arbitrary length for debugging purposes. More...
 
static bool EqualsAntiTimingAttack (byte[] a, byte[] b)
 Compare two byte arrays. Avoiding timing attacks by making sure that the comparison always takes the same amount of time. More...
 

Properties

static int CurrentPasswordSchemeNumber [get]
 Number of the Password Hashing Scheme that represents OpenPetra's current Password Hashing Scheme. More...
 
static IPasswordHashingScheme CurrentPasswordScheme [get]
 New instance of the Class that implements OpenPetra's current Password Hashing Scheme ('Factory Pattern'). More...
 

Detailed Description

Helper Class for dealing with the secure hashing of passwords in OpenPetra.

OpenPetra supports different versions of password hashing algorithms; these are implemented in the Classes that implement the IPasswordHashingScheme Interface!

Member Function Documentation

◆ EqualsAntiTimingAttack()

static bool Ict.Common.TPasswordHelper.EqualsAntiTimingAttack ( byte[]  a,
byte[]  b 
)
inlinestatic

Compare two byte arrays. Avoiding timing attacks by making sure that the comparison always takes the same amount of time.

Parameters
aarray 1.
barray 2.
Returns
True if equal. Otherwise False.

◆ GetPasswordSchemeHelperForVersion()

static IPasswordHashingScheme Ict.Common.TPasswordHelper.GetPasswordSchemeHelperForVersion ( int  AVersion)
inlinestatic

New instance of the Class that implements the specified version of OpenPetra's Password Hashing Scheme ('Factory Pattern').

◆ GetRandomSecurePassword()

static string Ict.Common.TPasswordHelper.GetRandomSecurePassword ( )
inlinestatic

Generates a new secure password.

Returns
New secure password.

◆ GetRandomToken()

static string Ict.Common.TPasswordHelper.GetRandomToken ( )
inlinestatic

return a token for the password reset functionality

◆ LogByteArrayContents()

static void Ict.Common.TPasswordHelper.LogByteArrayContents ( byte[]  AArray,
string  ADescription 
)
inlinestatic

Logs the decimal representation of a byte array of arbitrary length for debugging purposes.

Parameters
AArrayByte array.
ADescriptionDescription of the byte array.

Property Documentation

◆ CurrentPasswordScheme

IPasswordHashingScheme Ict.Common.TPasswordHelper.CurrentPasswordScheme
staticget

New instance of the Class that implements OpenPetra's current Password Hashing Scheme ('Factory Pattern').

IMPORTANT: This Method defines what is regarded as OpenPetra's current Password Hashing Scheme!!!

◆ CurrentPasswordSchemeNumber

int Ict.Common.TPasswordHelper.CurrentPasswordSchemeNumber
staticget

Number of the Password Hashing Scheme that represents OpenPetra's current Password Hashing Scheme.


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