[Oberon] How to mimic an associative array

Jan Verhoeven jan at verhoeven272.nl
Thu Dec 2 01:47:45 CET 2010


On Thursday 02 December 2010 00:47:32 Duke Normandin wrote:

> I have a copy, and I looked at it this morning. Scary! It's the
> presentation, NOT the subject matter. If only I wasn't so
> mathemata-phobic. :D

There are simpler methods than SHA-1 or MD5, yet not so good.

1: just add up all the ASCII codes of a word and do a modulo 65536

2: the same as above, but now you do an xor of the sum with the first 
few ascii tokens of the string to be hashed before modulo-ing

3: multiply token(x) by token(x+1) [whereby x = even] and add all the 
sums. Do a modulo to bring the numbers down.

4: xor all the ascii codes of one word together and store the sum; then 
sum the sums.

5: calculate a CRC over all the ascii codes of a word or sentence.

http://www.relisoft.com/science/crcmath.html
http://en.wikipedia.org/wiki/Cyclic_redundancy_check
http://en.wikipedia.org/wiki/Computation_of_CRC

-- 
Met vriendelijke groeten,

Jan Verhoeven
http://www.verhoeven272.nl



More information about the Oberon mailing list