minaalamshahi
یک شنبه 10 مهر 1390, 16:14 عصر
با سلام
من با استفاده از روش زیر پسوردم رو hash می کنم
آیا راهی برای بازیابی پس ورد hash شده وجود داره
protected string Hash(string input)
{
// Generate bytes for the input string
byte[] inputData = ASCIIEncoding.ASCII.GetBytes(input);
byte[] keyBytes = new byte[20];
keyBytes = ASCIIEncoding.ASCII.GetBytes("Parnian_Taxi_Portal");
// Compute HMACSHA1
HMACSHA1 hmac = new HMACSHA1(keyBytes);
CryptoStream cs = new CryptoStream(Stream.Null, hmac, CryptoStreamMode.Write);
cs.Write(inputData, 0, inputData.Length);
cs.Close();
string hash = ASCIIEncoding.ASCII.GetString(hmac.Hash);
return hash;
}
من با استفاده از روش زیر پسوردم رو hash می کنم
آیا راهی برای بازیابی پس ورد hash شده وجود داره
protected string Hash(string input)
{
// Generate bytes for the input string
byte[] inputData = ASCIIEncoding.ASCII.GetBytes(input);
byte[] keyBytes = new byte[20];
keyBytes = ASCIIEncoding.ASCII.GetBytes("Parnian_Taxi_Portal");
// Compute HMACSHA1
HMACSHA1 hmac = new HMACSHA1(keyBytes);
CryptoStream cs = new CryptoStream(Stream.Null, hmac, CryptoStreamMode.Write);
cs.Write(inputData, 0, inputData.Length);
cs.Close();
string hash = ASCIIEncoding.ASCII.GetString(hmac.Hash);
return hash;
}