ID:170708
 
Can anyone give me a quick tutorial on md5 or is there any on BYOND? I can't find any. How does it work like if I would save my hp/max_hp var, and if someone edits it using a savefile editor, or another program, it would catch them cheating?
I know theres some on the forums, type in cheating
In response to Repiv
Here's what I have so far and It doesn't work.

mob/var/hash = "1234567890" //this is just temp to make it easy to tell
mob/proc/MakeHash()
return "[hash][hp][hash][maxhp][hash][level][hash]"
mob/proc/CheckHash()
return "[hash][hp][hash][maxhp][hash][level][hash]"

mob/Save()
var/savefile/F = new("savedfiles/[src.ckey].sav")
F["char_mob"] << src.mob
F["char_hash"] << MakeHash()
mob/Login()
if(md5(CheckHash()) != hash)
src << "Cheater!"
del src


This doesn't seem to work. Am I doing something wrong?