Felix Ker's blog

How to generate random password (VB.Net/C#[ASP.Net]/PHP)

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

Read the rest of this entry »

Search!

What I'm Doing...

Top Commentators

  • GRI Management (3)
  • Link (3)
  • someone (: (2)
  • celv (2)
  • Jonny Liew (2)
  • Rachael (2)
  • me (1)
  • night owl (1)

MyBlogLog

Miscellaneous





web tracker