C# Class Iaik.Utils.Hash.ProtectedPasswordStorage

Holds a SecureString structure where the plaintext password is appended to. Once the password is completly appended it can be hashed and stored in protected memory, where only the running process has access to
The goal was to use ProtectedMemory for hash storage. Protected Memory encrypts data which is only accessible by this process, but this is not available on all platforms, so the workaround is to store the hash value in a secure string and convert it to byte[] once it is needed
Mostrar archivo Open project: areiter/InMemoryFuzzing Class Usage Examples

Public Methods

Method Description
AppendPasswordChar ( char p ) : void

Ads a password character to the plain password storage

ClearHash ( ) : void

Clears the hash in memory

DecryptHash ( ) : void

Decrypts the hash. don't forget to run ClearHash afterwards

EqualPassword ( ProtectedPasswordStorage obj ) : bool
ExportSecureString ( ) : SecureString
Hash ( ) : void

Locks the password and calculates the password hash

InjectHash ( byte hash ) : void
ProtectedPasswordStorage ( ) : System
ProtectedPasswordStorage ( string hashAlgo ) : System
WellKnown ( ) : void

Method Details

AppendPasswordChar() public method

Ads a password character to the plain password storage
public AppendPasswordChar ( char p ) : void
p char
return void

ClearHash() public method

Clears the hash in memory
public ClearHash ( ) : void
return void

DecryptHash() public method

Decrypts the hash. don't forget to run ClearHash afterwards
public DecryptHash ( ) : void
return void

EqualPassword() public method

public EqualPassword ( ProtectedPasswordStorage obj ) : bool
obj ProtectedPasswordStorage
return bool

ExportSecureString() public method

public ExportSecureString ( ) : SecureString
return System.Security.SecureString

Hash() public method

Locks the password and calculates the password hash
public Hash ( ) : void
return void

InjectHash() public method

public InjectHash ( byte hash ) : void
hash byte
return void

ProtectedPasswordStorage() public method

public ProtectedPasswordStorage ( ) : System
return System

ProtectedPasswordStorage() public method

public ProtectedPasswordStorage ( string hashAlgo ) : System
hashAlgo string
return System

WellKnown() public method

public WellKnown ( ) : void
return void