Results 1 to 1 of 1

Thread: Random Password Generator

  1. #1

    Thread Starter
    Frenzied Member vbdotnetboy's Avatar
    Join Date
    Jun 2004
    Location
    Lewisburg, PA "Next year Raiders in the Super Bowl"
    Posts
    1,310

    Thumbs up Random Password Generator

    Since I've posted the following class in a different thread, (which has now been moved here), about a way to randomly generate a password I have submitted my code here for everyone to use, tweak and make comments.

    Description:
    Call one of the overloaded functions and a you will have a randomly generated password.

    Generate() - Will generate a password 13 or (more/less) characters in length ranging from A-Z a-z 0-9 and other characters such as @ # %... etc.

    Generate(ByVal AsciiMin As Integer, ByVal AsciiMax As Integer)
    Generate(ByVal AsciiMin As Char, ByVal AsciiMax As Char)
    - Allows you to set your ASCII range if you wish not to include number for example.

    Generate(ByVal ExcludeValues As String()) - Works like Generate() buts characters passed in the array will not be used to generate the password.

    Generate(ByVal AsciiMin As Integer, ByVal AsciiMax As Integer, ByVal ExcludeValues As String())
    Generate(ByVal AsciiMin As Char, ByVal AsciiMax As Char, ByVal ExcludeValues As String())
    - Works like Generate(ByVal AsciiMin As Integer, ByVal AsciiMax As Integer) & Generate(ByVal AsciiMin As Char, ByVal AsciiMax As Char), but allows you to also exclude characters that you do not wish the generator to use.



    UPDATE
    03/06/2006: Included use of Phill64's TrueRandom2 class for generating random numbers. Also overloaded the constructor so that a length can be set for the password, if the length is not set the default is set to 13.

    please enjoy
    Attached Files Attached Files
    Last edited by vbdotnetboy; Mar 6th, 2006 at 03:08 PM.

    Derek - Using VS 2008 99% of the time and VS 2003 1% of the time

    Please Help Us To Save Ana

    ● Helpful Links: DNR TV | Awesome site for tips | Using ADO.NET to work with Excel | Xml Namespace 2.0 Framework Changes|Ultra High Security Password Generator | Mendhak's ADO.NET Tutorial
    ● Code Bank: Random Password Generator | Generic DbProviderFactory Access
    ● Site Work: Bottle Run Xtreme | Spaids Racing.com

    Company I work for - CSSI

    WHEN POSTING PLEASE INDICATE VERSION

    Please use vbcode tags or code tags when posting code
    [highlight=vb]ALL your code goes here[/highlight] or [code]ALL your code goes here[/code]

    If my post helped you in anyway... please be kind and give me some ratings

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width