Get Random Passward (String) Using GUID , Passward Length (Maximum) 36 Char


Get Random Passward (String) Using GUID , Passward Length (Maximum) 36 Char

Get Random Passward (String) Using GUID
GUID - Represents a Globally unique identifier.
Purpose : Function For Generatind Password Using System.Guid.NewGuid()
Paramete : Length - Passward Length (Maximum) 36 Char

Code:

 
Public Function GetRandomPasswordUsingGUID(ByVal length As Double) As String
Dim guidResult As String = System.Guid.NewGuid.ToString
If length <= 0 OrElse length > guidResult.Length Then
Throw New ArgumentException("Length must be between 1 and " & guidResult.Length)
End If
Return guidResult.Substring(0, length)
End Function


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: