Skip to content

sedders123/XKCDPasswordGen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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).