A component add MD5 signature at files uploaded

  • Thread starter Thread starter luigi.corrias
  • Start date Start date
L

luigi.corrias

Someone can tell me if it exist for asp.net, where i can find etc?..

Thanks and happy new year

Luigi
 
Hello Luigi

These is build in at the .NET Framework.
System.Security.Cryptography

for example (not tested):

private string GetFileHash(byte[] file) {
MD5 hasher = MD5.Create();
byte[] data = hasher.ComputeHash(file);
StringBuilder sb = new StringBuilder();

foreach (byte d in data)
sb.Append(d.ToString("x2"));

return sb.ToString();
}

see: http://www.google.ch/search?hl=de&q=get+hash+from+file+.net&meta=
 
Thanks Peter

But i don't understand

The MD% signatire of the file is the same i can find using an utility
like fsum

Thank again and happy New year

L.
 
Back
Top