Add authcomplex-passwd script
[plack-middleware-auth-complex.git] / lib / Plack / Middleware / Auth / Complex.pm
index 035a622259353c963f2577d33bcededeae519dfc..6c08273df4b1ad9f11d021cd6ad165cc4f95342f 100644 (file)
@@ -4,14 +4,14 @@ use 5.014000;
 use strict;
 use warnings;
 
-our $VERSION = '0.001';
+our $VERSION = '0.001001';
 
 use parent qw/Plack::Middleware/;
 use re '/s';
 
 use Authen::Passphrase;
 use Authen::Passphrase::BlowfishCrypt;
-use Bytes::Random::Secure qw/random_bytes/;
+use Bytes::Random::Secure qw//;
 use Carp qw/croak/;
 use DBI;
 use Digest::SHA qw/hmac_sha1_base64 sha256/;
@@ -100,7 +100,7 @@ sub set_passphrase {
 
 sub make_reset_hmac {
        my ($self, $username, @data) = @_;
-       $self->{hmackey} //= random_bytes 512; # uncoverable condition false
+       $self->{hmackey} //= Bytes::Random::Secure->new(NonBlocking => 1)->bytes(512); # uncoverable condition false
        my $user = $self->get_user($username);
        my $message = join ' ', $username, $user->{passphrase}, @data;
        hmac_sha1_base64 $message, $self->{hmackey};
@@ -519,7 +519,7 @@ Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (C) 2015 by Marius Gavrilescu
+Copyright (C) 2015-2017 by Marius Gavrilescu
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself, either Perl version 5.20.1 or,
This page took 0.010105 seconds and 4 git commands to generate.