Created
November 24, 2014 04:27
-
-
Save praswicaksono/68c1d831b5331620fc1f to your computer and use it in GitHub Desktop.
UltimateZip 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 part1 As String = genRandomString(4) | |
| Dim part2 As String = genRandomString(4) | |
| Dim sha As String = doSHA512(part1 & part2) | |
| sha = part1 & part2 & sha | |
| Dim part3 As String = sha(32) & sha(33) & sha(34) & sha(35) | |
| Dim part4 As String = sha(92) & sha(93) & sha(94) & sha(95) | |
| Dim part5 As String = sha(124) & sha(125) & sha(126) & sha(127) | |
| TextBox1.Text = part1 & "-" & part2 & "-" & part3 & "-" & part4 & "-" & part5 | |
| End Sub | |
| Private Function genRandomString(ByVal lenght As Integer) | |
| Dim validchars As String = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
| 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 doSHA512(ByVal input As String) | |
| Dim sha As SHA512 = System.Security.Cryptography.SHA512.Create() | |
| Dim inputBytes As Byte() = System.Text.Encoding.ASCII.GetBytes(input) | |
| Dim hash As Byte() = sha.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().ToUpper() | |
| End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment