06-09-2021, 09:17 PM
Imports System.Text
Imports System.Security.Cryptography
Imports Microsoft.Win32
Public Class KeyGen
Private Function getLicenseCode(ByVal source As String) As String
Return BitConverter.ToString(New SHA1CryptoServiceProvider().ComputeHash(Encoding.[Default].GetBytes(source))).Replace("-", String.Empty)
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
textBoxLicense.Text = ""
For i As Integer = 0 To CInt(Math.Ceiling(Rnd() * 2500))
textBoxLicens.Text = Me.getLicenseCode(i.ToString() + "PDFSigner9".ToLower()).Substring(0, 20).ToLower()
Next
End Sub
End Class