CRC32 & MD5 [Example]

Post your own tutorials, guides and demos.

Post » Sat Jan 29, 2011 2:05 pm

Short example of how CRC32 and the MD5 plug work

You should already have CRC32 installed, and MD5 is here:
[url:3rwwrf7i]http://www.scirra.com/forum/viewtopic.php?f=16&t=1613&p=11290&hilit=md5#p11290[/url:3rwwrf7i]


[url:3rwwrf7i]http://dl.dropbox.com/u/666516/hashtest.zip[/url:3rwwrf7i]

To test it change the included text file, and run the cap again.

I'll add: probably the easiest way to get the hash to use for a comparison is to send it to the system clipboard, and paste it into your cap.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Sat Jan 29, 2011 4:00 pm

I can still read the original file, so what's the point?
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,129

Post » Sat Jan 29, 2011 4:32 pm

You cant change it.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Sat Jan 29, 2011 6:12 pm

Can I change it in the runtime?

Edit: i think i see now how is this usefull. I can make my game database and then use this code so the player can't change the file, right?
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,129

Post » Sat Jan 29, 2011 6:38 pm

Yep that's the idea.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Sat Feb 26, 2011 6:27 am

Which one is better to use?
B
4
S
1
G
1
Posts: 63
Reputation: 776

Post » Sat Feb 26, 2011 12:13 pm

Either one really.
The only difference I see is CRC32 seems to need a tick before you can read it.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest