C# Класс 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
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Описание методов

AppendPasswordChar() публичный Метод

Ads a password character to the plain password storage
public AppendPasswordChar ( char p ) : void
p char
Результат void

ClearHash() публичный Метод

Clears the hash in memory
public ClearHash ( ) : void
Результат void

DecryptHash() публичный Метод

Decrypts the hash. don't forget to run ClearHash afterwards
public DecryptHash ( ) : void
Результат void

EqualPassword() публичный Метод

public EqualPassword ( ProtectedPasswordStorage obj ) : bool
obj ProtectedPasswordStorage
Результат bool

ExportSecureString() публичный Метод

public ExportSecureString ( ) : SecureString
Результат System.Security.SecureString

Hash() публичный Метод

Locks the password and calculates the password hash
public Hash ( ) : void
Результат void

InjectHash() публичный Метод

public InjectHash ( byte hash ) : void
hash byte
Результат void

ProtectedPasswordStorage() публичный Метод

public ProtectedPasswordStorage ( ) : System
Результат System

ProtectedPasswordStorage() публичный Метод

public ProtectedPasswordStorage ( string hashAlgo ) : System
hashAlgo string
Результат System

WellKnown() публичный Метод

public WellKnown ( ) : void
Результат void