HighTechTalks DotNet Forums  

A component add MD5 signature at files uploaded

ASP.net ASP.net discussions (microsoft.public.dotnet.framework.aspnet)


Discuss A component add MD5 signature at files uploaded in the ASP.net forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
luigi.corrias@gmail.com
 
Posts: n/a

Default A component add MD5 signature at files uploaded - 01-03-2008 , 02:02 AM






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

Thanks and happy new year

Luigi

Reply With Quote
  #2  
Old   
Peter Bucher [MVP]
 
Posts: n/a

Default Re: A component add MD5 signature at files uploaded - 01-03-2008 , 11:14 AM






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=...ile+.net&meta=

--
Gruss, Peter Bucher
Microsoft MVP - Visual Developer ASP / ASP.NET, Switzerland
http://www.aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community
http://www.aspnetzone.de/blogs/peterbucher/ - Auf den Spuren von .NET

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.