on July 7, 2010 by Adam in Uncategorized, Comments (0)
VB.net Hashing Tool
I decided to make this tool after taking Wired.com‘s ‘Crack the Code in Cyber Command’s Logo’ challenge. In it we were to crack the code on the logo given the key given inside the logo.
First of all, the fastest way to find the answer is to see if it already exists! By searching this problem on a popular search engine quickly reveals that the answer is that this was the hashed result of the Cyber mission statement! To verify this, simply use any free online MD5 hash generators and plug in the mission statement pulled from this document.
After doing all that, I came to the realization I wanted to create something that would both be a learning experience and also be beneficial to others without access to the internet running on a Windows OS. Below is code and an executable for a Windows MD5 hasher.
Imports System.Text
Imports System.Security.Cryptography
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox2.Text = MD5(TextBox1.Text)
End Sub
Public Function MD5(ByVal number As String) As String
Dim ASCIIenc As New ASCIIEncoding
Dim strReturn = ""
Dim ByteSourceText() As Byte = ASCIIenc.GetBytes(number)
Dim Md5Hash As New MD5CryptoServiceProvider
Dim ByteHash() As Byte = Md5Hash.ComputeHash(ByteSourceText)
For Each b As Byte In ByteHash
strReturn &= b.ToString("x2")
Next
Return strReturn
End Function
End Class
Tags: programming

No Comments
Leave a comment