Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 1.25 KB

README.md

File metadata and controls

32 lines (23 loc) · 1.25 KB

XKCDPasswordGen

Latest Nuget Verison License

An XKCD style password generator for C#

Randomly returns a given number of words from the EFF Large Wordlist

Idea based of XKCD 936

Usage

using XCKDPasswordGen;

public class Program(){
    var fourWordPassword = XkcdPasswordGen.Generate(4);
    Console.WriteLine("4 random words: " + fourWordPassword);

    var dashPassword = XkcdPasswordGen.Generate(4, "-");
    Console.WriteLine("4 random words separated by a dash: " + dashPassword);
}

API

XkcdPasswordGen.Generate(int numWords, string separator = " ", bool crypto = true)

Option Description
numWords Number of words to be included in the generated password.
separator String to go inbetween each word in the generated password.
crypto Use cryptographicaly secure random number generator (Slower than standard random number generator).