Advertisement
pavlik_yt

Password Generator

Apr 27th, 2023 (edited)
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.33 KB | Cybersecurity | 0 0
  1. Dim chars As String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+-="
  2. Dim length As Integer = 8 'You can use any value. 8 is the best
  3. Dim password As String = ""
  4. Dim rand As New Random()
  5. For i As Integer = 0 To length - 1
  6.     password += chars(rand.Next(chars.Length))
  7. Next
  8. TextBox1.Text = password
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement