Crypt-PerfectPaperPasswords

 view release on metacpan or  search on metacpan

lib/App/PerlPPP.pm  view on Meta::CPAN

}

=head2 C<do_help>

Output help page

=cut

sub do_help {
  my $self = shift;
  pod2usage( -verbose => 1 );
}

sub _make_key {
  my $self = shift;

  if ( defined( my $key = $self->key ) ) {
    return $key;
  }
  elsif ( defined( my $phrase = $self->passphrase ) ) {
    return $self->key( $self->_make_ppp->sequence_from_key( $phrase ) );
  }
  else {
    return;
  }
}

sub _get_key {
  my $self = shift;
  return $self->_make_key
   || die "Must supply --key or --passphrase\n";
}

sub _make_ppp {
  my $self = shift;
  my %args;
  for my $a ( qw( alphabet codelen ) ) {
    if ( defined( my $value = $self->$a() ) ) {
      $args{$a} = $value;
    }
  }

  return $self->{_ppp} ||= Crypt::PerfectPaperPasswords->new( %args );
}

1;
__END__

=head1 CONFIGURATION AND ENVIRONMENT
  
App::PerlPPP requires no configuration files or environment variables.

=head1 DEPENDENCIES

L<Crypt::PerfectPaperPasswords>

=head1 INCOMPATIBILITIES

None reported.

=head1 BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to
C<bug-crypt-perfectpaperpasswords@rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org>.

=head1 AUTHOR

Andy Armstrong  C<< <andy@hexten.net> >>

Original Perfect Paper Passwords implementation by Steve Gibson. More details
here:

    http://www.grc.com/ppp.htm

=head1 LICENCE AND COPYRIGHT

Copyright (c) 2007, Andy Armstrong C<< <andy@hexten.net> >>.

This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself. See L<perlartistic>.



( run in 1.377 second using v1.01-cache-2.11-cpan-39bf76dae61 )