summaryrefslogtreecommitdiff
path: root/Echolot/Tools.pm
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2002-07-17 17:06:44 +0000
committerPeter Palfrader <peter@palfrader.org>2002-07-17 17:06:44 +0000
commit0de702218fe446ccf8342e41ce32dff871b03fdd (patch)
treecf2c0a2e83da15141e6baf2cc71f03556b4d4da3 /Echolot/Tools.pm
parent6e34ee5124cea160f08736992629c6760949bb1a (diff)
moved makeHash to Tools
Diffstat (limited to 'Echolot/Tools.pm')
-rw-r--r--Echolot/Tools.pm11
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) = @_;