GetRandomPassword – Generating a random password with the specified length

GetRandomPassword – Generating a random password with the specified length

' Generate a random password with the specified length. The password will only ' contain digits and letters (either lowercase or uppercase)'' Example: generating a password of 8 chars'    Dim password As String = GetRandomPassword(8)Function GetRandomPassword(ByVal length As Integer) As String    Static rand As New Random    Dim password As New System.Text.StringBuilder(length)    For i As Integer = 1 To length        Dim charIndex As Integer        ' allow only digits and letters        Do            charIndex = rand.Next(48, 123)        Loop Until (charIndex >= 48 AndAlso charIndex <= 57) OrElse (charIndex _            >= 65 AndAlso charIndex <= 90) OrElse (charIndex >= 97 AndAlso _            charIndex <= 122)        ' add the random char to the password being built        password.Append(Convert.ToChar(charIndex))    Next    Return password.ToString()End Function

Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes