3 # This module impliments the verification routines
5 # Copyright (c) 2002 Dirk Koopman G1TLH
16 use Digest::SHA1 qw(sha1_base64);
18 use vars qw($VERSION $BRANCH);
19 $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
20 $BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /^\d+\.\d+(?:\.(\d+)\.(\d+))?$/ || (0,0));
21 $main::build += $VERSION;
22 $main::branch += $BRANCH;
27 my $self = bless {}, ref($class) || $class;
35 return $self->{salt} = sha1_base64('RbG4tST2dYPWnh6bfAaq7pPSL04', @_);
41 my $p = substr(sha1_base64($self->{salt}, @_), -6, 6);
49 my $p = substr(sha1_base64($self->{salt}, @_), -6, 6);
56 return @_ ? $self->{salt} = shift : $self->{salt};