summaryrefslogtreecommitdiff
path: root/scripts/myhash.pm
blob: 5d8f1bd93ac6beeeca7fe8129bb571636b9d90c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package myhash;


##################################################
#
# GiantDisc mp3 Jukebox
# 
# © 2000, Rolf Brugger
#
##################################################

#use lib '/usr/local/bin';
#BEGIN{;}
#END{;}


############################################################
###
sub addvaltohash{ # gets a current hashval and a new elment
		  # returns new hashval
  my ($hashval,$newelement) = @_;

  return (($hashval << 5) ^ ($hashval >> 27)) ^ $newelement;
  # (^ is bitwise EXOR)
}


1;
#