private string GenerateHash() { byte[] rnd = new byte[32]; random.NextBytes(rnd); string h = DecodeEncodeHelper.Bin2Hex(rnd); return(h); }
private string EnhancePassword(string password) { ReadHash(); HMACSHA1 hmac = new HMACSHA1(Encoding.UTF8.GetBytes(password)); byte[] h = hmac.ComputeHash(Encoding.UTF8.GetBytes(_hash)); return(DecodeEncodeHelper.Bin2Hex(h)); }
private string EnhancePasswordOLD(string password) { ReadHash(); byte[] h = (new SHA256Managed()).ComputeHash(Encoding.UTF8.GetBytes(String.Concat(password, _hash))); return(DecodeEncodeHelper.Bin2Hex(h)); }