Discuss Scratch

OffKilter
Scratcher
7 posts

How to Make A Simple Hash Function

I need one for an AI I'm making.
Ante22
Scratcher
100+ posts

How to Make A Simple Hash Function

You need to add more details

Check out my game ☁ Cloud Farm: http://scratch.mit.edu/projects/25278669/
MegaApuTurkUltra
Scratcher
1000+ posts

How to Make A Simple Hash Function

To make a good hash function you will need some way to convert letters to numbers. In most programming languages the byte value of a letter is used in calculating hashes (remember that letters are stored as bytes). However, in Scratch, I don't think this is possible. You will need to make a list with all the letters you want to be able to hash. Then go google “simple hash functions” and implement one. Use ApuC if porting C to Scratch is too complicated.

Last edited by MegaApuTurkUltra (Sept. 6, 2014 23:48:41)


$(".box-head")[0].textContent = "committing AT crimes since $whenever"

Powered by DjangoBB