Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MD5 VB.NET code
Message
De
24/01/2014 04:19:47
 
 
À
23/01/2014 16:44:15
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01592356
Message ID:
01592364
Vues:
66
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform