/ domm

I hack Perl for fun and profit

Follow me on twitter!
Atom Icom ... on Atom!
27.05.2018: Syncing data using advanced SQL
08.04.2018: Things I learned at the German Perl Workshop 2018
11.03.2018: Forking tests
26.02.2018: Announcing Plack::Middleware::StatsPerRequest
18.02.2018: Announcing CtrlO::Crypt::XkcdPassword

I just uploaded CtrlO::Crypt::XkcdPassword to CPAN, which is my first CPAN module I was paid to develop (as opposed to various other modules that were extracted from some private codebases). So, thanks to CtrlO for supporting open source!

But back to the module: CtrlO::Crypt::XkcdPassword generates passwords based on this famous xkcd

Example use

Some code examples say more than 1000 words:

   my $generator = CtrlO::Crypt::XkcdPassword->new;

   say $generator->xkcd;

   say $generator->xkcd( words => 3, digits = 3);

You can also use the included script pwgen-xkcd.pl

   ~$ pwgen-xkcd.pl

   ~$ pwgen-xkcd.pl --words 3 --digits 3

Of course you can also load some custom word lists:

   my $generator = CtrlO::Crypt::XkcdPassword->new(
       wordlist => '/etc/passwd' ) # don't!

Or use some of the wordlists available on CPAN:

  my $generator = CtrlO::Crypt::XkcdPassword->new(
       wordlist => 'WordList::ZH::HSK' )

Another "inspiration"

CPAN being CPAN, there are already several modules inspired by this xkcd, so CtrlO::Crypt::XkcdPassword is also inspired by

Why another one?

Give it a try!

  ~$ cpanm CtrlO::Crypt::XkcdPassword
  ~$ pwgen-xkcd.pl

and as always: Patches welcome!...

Comments (via senph)

12.08.2017: How to make Perl conferences beginner friendly
12.08.2017: Things I learned at the European Perl Conference 2017 in Amsterdam
04.08.2017: What I expect from a Web Framework
13.07.2017: Using a DarkPAN with Carton
02.01.2017: Vienna.pm Meeting dates for 2017 (as calculated by Perl 6)