diff options
Diffstat (limited to 'Echolot/Tools.pm')
-rw-r--r-- | Echolot/Tools.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Echolot/Tools.pm b/Echolot/Tools.pm index 403c02b..e4bed61 100644 --- a/Echolot/Tools.pm +++ b/Echolot/Tools.pm @@ -1,7 +1,7 @@ package Echolot::Tools; # (c) 2002 Peter Palfrader <peter@palfrader.org> -# $Id: Tools.pm,v 1.6 2002/07/16 02:48:57 weasel Exp $ +# $Id: Tools.pm,v 1.7 2002/07/17 17:06:44 weasel Exp $ # =pod @@ -54,6 +54,15 @@ sub make_mac($) { return $mac; }; +sub makeShortNumHash($) { + my ($text) = @_; + + my $hash = Echolot::Tools::make_mac($text); + $hash = substr($hash, 0, 4); + my $sum = hex($hash); + return $sum; +}; + sub verify_mac($$) { my ($token, $mac) = @_; |