KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Using C#, I want to create an MD5 hash of a text file. How can I accomplish this? Update: Thanks to everyone for their help. I've finally settled upon the following code - // Create an MD5 hash digest of a file public string MD5HashFile(string fn) { byte[] hash = MD5.Create().ComputeHash(File.ReadAllBytes(fn)); return BitConverter.ToString(hash).Replace("-", ""); }
Tags (comma-separated)
Save Edits
Cancel