Tag Archives: md5

What is an Hash Algorithm and What are Hash Collisions? Tech News 29 JUL 2015

Tom Scott, who I think is particularly adept at explaining complex computing concepts in very understandable and relatable ways, joins up with Computerphile to explain what exactly the idea behind hash algorithms are, how they can be used to confirm a file’s transmission for the most part, and what things called hash collisions are.

Great, so just in case you were still using MD5 for something meaningful then, best you move over to something a little more modern, no?


Related Link: Youtube

MD5 Hash Prefixer and Image Size Standardiser Projects | Software & Sites 03 SEP 2007

Two more quick and dirty applications that I needed can now be found under the CodeUnit banner.

MD5 Hash Prefixer

MD5 Hash Prefixer takes all the files in a specified folder, creates a MD5 hash for all the file names and then prefixes that hash to each file name. Note that the folder parsing is not recursive in nature.

The files are all backed up before the process is undertaken.

md5 hash prefixer screenshot

Image Size Standardiser

Image Size Standardiser allows you to force all the image files in a specified folder to either a specific width or height (in pixels). The images are all stretched and shrunk to meet the required measure, though this is done while maintaining the image’s original aspect ratio.

The files are all backed up before the process is undertaken.

image size standardiser screenshot

Related link: https://github.com/craiglotter/

Create a cryptographic MD5 hash in VB.NET Programming 29 AUG 2007

You’ve often seen these long, seemingly random numbers in secured web pages and perhaps wondered just what the heck that is meant to be. Well, usually these long numbers are hash codes, a system used to perform one-way data authentication. The MD5 hash algorithm is one of the most commonly used hashing functions, mainly because of its ease of implementation and the fact that it is a fairly secure one direction hash (In fact, this is basically how Windows authenticates its passwords).

Creating hash codes in VB6 was quite a mission, possible, but a mission. Then came along VB.NET to make things a little easier, providing a fairly decent set of classes under its System.Security.Cryptography namespace.

As an example, below is a generic function that returns an MD5 hash, formatted as a String, from the contents of a string you pass into the function:

Imports System.Text
Imports System.Security.Cryptography

Private Function GenerateHash(ByVal SourceText As String) As String
' Create an encoding object to ensure the encoding standard for the source text

Dim Ue As New UnicodeEncoding()
' Retrieve a byte array based on the source text

Dim ByteSourceText() As Byte = Ue.GetBytes(SourceText)
' Instantiate an MD5 Provider object

Dim Md5 As New MD5CryptoServiceProvider()
' Compute the hash value from the source

Dim ByteHash() As Byte = Md5.ComputeHash(ByteSourceText)
' And convert it to String format for return

Return Convert.ToBase64String(ByteHash)
End Function

microsoft vb.net

Related link: http://www.a1vbcode.com/vbtip-149.asp