Created
November 24, 2014 04:25
-
-
Save praswicaksono/07c2bb3fd15660a8028a to your computer and use it in GitHub Desktop.
HiDownload Keygen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click | |
Dim count As Integer = rand.Next(4, 9) | |
Dim part1 As String = genRamdomString(count) | |
TextBox1.Text = count.ToString() & part1 & doMD5(part1) | |
End Sub | |
Private Function genRamdomString(ByVal lenght As Integer) | |
Dim validchars As String = "1234567890" | |
Dim sb As New StringBuilder() | |
For i As Integer = 1 To lenght Step 1 | |
sb.Append(validchars(rand.Next(0, validchars.Length))) | |
Next | |
Return sb.ToString() | |
End Function | |
Private Function doMD5(ByVal input As String) | |
Dim md5 As MD5 = System.Security.Cryptography.MD5.Create() | |
Dim inputBytes As Byte() = System.Text.Encoding.ASCII.GetBytes(input & "HiDownloadPlatinum") | |
Dim hash As Byte() = md5.ComputeHash(inputBytes) | |
Dim sb As New StringBuilder() | |
For i As Integer = 0 To hash.Length - 1 | |
sb.Append(hash(i).ToString("x2")) | |
Next | |
Return sb.ToString() | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment