A component add MD5 signature at files uploaded

L

luigi.corrias

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

Thanks and happy new year

Luigi
 
P

Peter Bucher [MVP]

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=
 
L

luigi.corrias

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,436
Messages
2,571,696
Members
48,796
Latest member
Greg L.
Top