TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: ALL
from: GARY PRICE
date: 1995-10-22 10:01:00
subject: Hashing

Does anyone out there know and understand hashing?
 
I got a file created by 'c++' that I am tring to read in and to 
understand this hashing, but cannot seem to get anywhere with it...
 
Here are the specifics of the file:
 
Type UserIdx
  UserName AS STRING * 61
  RecordNumber AS LONG
END TYPE
 
My total record count 281 records. However, the UserIdx file that was 
created with hashing stays at a constant of 4258865 bytes.
 
I asked the author about this "Hashing" and this was what he sent to 
me.
=======================================================================
He Quotes to me:
 
Here's the source for that:
 
{
        LONG h;
 
        for (h = OL; *s; s++)
                h = (h * 256L + toupper(*s)) % 65521L;
        return h;
}
=======================================================================
I hope someone out there can help.. I looked everywhere in my 
PowerBasic v3.2 manuals and cannot seem to find anything on this 
"Hashing"... I hope this does not mean PowerBasic is limited when it 
comes to this... :(
 
            Thanks in Advance!
 
                        Gary
--- TriToss (tm) Professional 10.0 - #98
---------------
* Origin: Freejack's Place * Vinemont, Al * (205) 739-7121 (1:3607/26.0)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.