Description: Replace dependency on Digest::SHA1 with Digest::SHA. Replace SHA1 with SHA-1 in comments. Author: Christopher Hoskin Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=101955 Last-Update: 2018-02-17 --- --- a/META.json +++ b/META.json @@ -35,7 +35,7 @@ "Class::Accessor::Fast" : 0, "Crypt::PasswdMD5" : 0, "Digest" : 0, - "Digest::SHA1" : 0, + "Digest::SHA" : 0, "IO::LockedFile" : 0, "Scalar::Util" : 0 } --- a/META.yml +++ b/META.yml @@ -21,7 +21,7 @@ Class::Accessor::Fast: 0 Crypt::PasswdMD5: 0 Digest: 0 - Digest::SHA1: 0 + Digest::SHA: 0 IO::LockedFile: 0 Scalar::Util: 0 version: 0.171 --- a/Makefile.PL +++ b/Makefile.PL @@ -14,7 +14,7 @@ 'Class::Accessor::Fast' => 0, 'IO::LockedFile' => 0, 'Digest' => 0, - 'Digest::SHA1' => 0, + 'Digest::SHA' => 0, 'Crypt::PasswdMD5' => 0, 'Scalar::Util' => 0, }, --- a/README +++ b/README @@ -26,8 +26,8 @@ DESCRIPTION This module provides a convenient, object-oriented interface to Apache-style .htpasswd files. It supports passwords encrypted via MD5, - SHA1, and crypt, as well as plain (cleartext) passwords. It requires - Crypt::PasswdMD5 for MD5 and Digest::SHA1 for SHA1. Additional fields + SHA-1, and crypt, as well as plain (cleartext) passwords. It requires + Crypt::PasswdMD5 for MD5 and Digest::SHA for SHA-1. Additional fields after username and password, if present, are accessible via the "extra_info" array. --- a/lib/Authen/Htpasswd.pm +++ b/lib/Authen/Htpasswd.pm @@ -48,7 +48,7 @@ This module provides a convenient, object-oriented interface to Apache-style F<.htpasswd> files. -It supports passwords encrypted via MD5, SHA1, and crypt, as well as plain +It supports passwords encrypted via MD5, SHA-1, and crypt, as well as plain (cleartext) passwords. Additional fields after username and password, if present, are accessible via --- a/t/04core.t +++ b/t/04core.t @@ -28,7 +28,7 @@ } SKIP: { - skip "Digest::SHA1 is required for md5 passwords", 2 unless grep { $_ eq 'sha1' } @{$file->check_hashes}; + skip "Digest::SHA is required for SHA-1 passwords", 2 unless grep { $_ eq 'sha1' } @{$file->check_hashes}; ok( $file->check_user_password(qw/ fred fribble /), 'sha1 password verified' ); ok( !$file->check_user_password(qw/ fred frobble /), 'incorrect sha1 password rejected' ); } @@ -39,4 +39,4 @@ my @users = $file->all_users; is( scalar @users, 4, 'returned correct number of users' ); is( $users[0]->username, 'bob', 'first user has right name' ); -is( $users[-1]->username, 'joe', 'last user has right name' ); \ No newline at end of file +is( $users[-1]->username, 'joe', 'last user has right name' );