Is this the solution i seek to turn an 'absolute path' <=> '5-digit number' ?my @i = split(//,$url); # put each letter in it's own bin my $j=0; # Initailize our my $k=1; # hashing increment values my @m=(); # workspace foreach my $n(@i){ my $q=ord($n); # ASCII for character $k += $j; # Increment our hash offset $q += $k; # add our "old" value $j = $k; # store that. push @m,$q; # save the offsetted value } my $hashval=0; #initialize our hash value # Generate that map { $hashval = ($hashval + $_) % 100000} @m;
In reply to Re^4: Converting a number back to it's original string (that was hashed to generate that number)
by Nik
in thread Reaped: Converting a number back to it's original string (that was hashed to generate that number)
by NodeReaper
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |