giammin

Sha1 file checksum

Apr 26th, 2012
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.20 KB | None | 0 0
  1. using (FileStream fs = new FileStream(@"C:\file\location", FileMode.Open))
  2. {
  3.     using (SHA1Managed sha1 = new SHA1Managed())
  4.     {
  5.     string hash = BitConverter.ToString(sha1.ComputeHash(fs));
  6.     }
  7. }
Advertisement
Add Comment
Please, Sign In to add comment