chiark / gitweb /
cope with new Digest::MD5
authorijackson <ijackson>
Wed, 23 Mar 2016 15:58:24 +0000 (15:58 +0000)
committerijackson <ijackson>
Wed, 23 Mar 2016 15:58:24 +0000 (15:58 +0000)
passwords.pl

index 430b4141cc46c07845522865e1eaa07edcccb544..419b2ca6364c6e9a4c8cf4402b181d19c198e65f 100644 (file)
@@ -16,7 +16,7 @@
 # License along with this file; if not, write to the Free Software
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-use MD5;
+use Digest::MD5 qw(md5);
 
 sub check_password () {
     my ($pw);
@@ -41,7 +41,7 @@ sub calc_password ($$) {
 
     $keyhex =~ m/^[0-9a-f]+$/ or die "$keyhex ?";
     $key= pack('H*',$keyhex);
-    $digest= MD5->hash("BCP5Registry password 1 $id ".$key);
+    $digest= md5("BCP5Registry password 1 $id ".$key);
     return unpack('H20',$digest);
 }