How to generate random password (VB.Net/C#[ASP.Net]/PHP)
Posted on March 29th, 2008 by Felix Ker
Lately I was googling for the shortest and simplest way of generating some random passwords. So here we go. I’ll share with you what I found and how I applied them.
VB.Net
Public Function GenerateRandomPassword(ByVal length as Integer) as String
Dim strGuid as String = System.Guid.NewGuid().ToString()
strGuid= strGuid.Replace(”-”, String.Empty)
Return strGuid.Substring(0, length)
End Function
Post Rating:
Related entries:
