Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MD5 VB.NET code
Message
From
24/01/2014 04:19:47
 
 
To
23/01/2014 16:44:15
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01592356
Message ID:
01592364
Views:
64
This message has been marked as a message which has helped to the initial question of the thread.
>It appears I will need to use the MD5 16 bytes calculation faster than expected. We just got a new option we have to do and we will verify for duplicates. If anyone has already the code for calculating a MD5 into a character 16 field in VB.NET that would like to share, feel free to post a reply.
>
>Thanks

The output of an MD5 hash is a byte[16]. If you want chars, you'll need to convert the bytes to hex, but this doubles the size
You do not need to convert to hex if you use a binary(16) field in sql server

The class here http://msdn.microsoft.com/en-us/library/system.security.cryptography.md5(v=vs.110).aspx

has a method ComputeHash() with 3 overloads http://msdn.microsoft.com/en-us/library/system.security.cryptography.md5_methods(v=vs.110).aspx

There's an example at the bottom.

To compute the hash for a file you would open the file and pass the stream to ComputeHash()
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform