Subject: | Digest::SHA |
Hi Kevin,
Debian and *BSD do not want to make standard packages for Digest::SHA1.
They nag me quite often about it: they are serious! Please can you
update your module (which I use) as well so I can get rit of this
dependency? There is already an other report for this issue, over a
year old.
Change:
elsif (index($cryptPass, $SHA1Magic) == 0) {
# This is an SHA1 password
require Digest::SHA1;
require MIME::Base64;
return 1 if '{SHA}'.MIME::Base64::encode_base64(
Digest::SHA1::sha1( $pass ), '' ) eq $cryptPass;
}
Into (untested)
elsif (index($cryptPass, $SHA1Magic) == 0) {
# This is an SHA1 password
require Digest;
return 1 if $cryptPass eq
Digest->new('SHA-1')->add($pass)->b64digest;
}
You may change this as well:
carp $self->error() unless caller ne $self;
into
carp $self->error() if caller eq $self;