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
Afficher le fichier Open project: areiter/InMemoryFuzzing Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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

ClearHash() public méthode

Clears the hash in memory
public ClearHash ( ) : void
Résultat void

DecryptHash() public méthode

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

EqualPassword() public méthode

public EqualPassword ( ProtectedPasswordStorage obj ) : bool
obj ProtectedPasswordStorage
Résultat bool

ExportSecureString() public méthode

public ExportSecureString ( ) : SecureString
Résultat System.Security.SecureString

Hash() public méthode

Locks the password and calculates the password hash
public Hash ( ) : void
Résultat void

InjectHash() public méthode

public InjectHash ( byte hash ) : void
hash byte
Résultat void

ProtectedPasswordStorage() public méthode

public ProtectedPasswordStorage ( ) : System
Résultat System

ProtectedPasswordStorage() public méthode

public ProtectedPasswordStorage ( string hashAlgo ) : System
hashAlgo string
Résultat System

WellKnown() public méthode

public WellKnown ( ) : void
Résultat void