I've created a program to receive a hash code of an .exe file. And than with streamwriter I wrote it to an .exe file. If I wanna open the .exe of it I get the error: is not a valid win32 application.
What can I do with the hash and is it possible to create an .exe file from it that works.
Thank you very much!
byte[] hash;
using (Stream stream = File.OpenRead(@"C:\Program files\CCleaner\CCleaner.exe"))
{
hash = SHA1.Create().ComputeHash(stream);
}
string base64Hash = Convert.ToBase64String(hash);
Console.WriteLine(base64Hash);
StreamWriter myWriter = new StreamWriter(@"C:\Users\Win7\Desktop\Hash.exe");
myWriter.Write(base64Hash);