The purpose of this library is to use an md5() hash to secure a savefile from tampering,
in a manner which is not trivially circumvented.
This library defines three new procs:
safe_save(var/savefile/F, var/name)
Creates a new, protected savefile with the specified name from F.
Returns the newly-created, protected savefile.
The savefile F is left unmodified.
safe_load(var/savefile/F)
Creates a new savefile from the protected savefile F (created using safe_save()).
Returns the un-protected savefile, for reading.
The returned savefile can be read as normal, and is created as a temporary savefile.
Will return null if the savefile has been found to be tampered with.
make_hash(var/text)
Creates a hash from a text string. By default, will simply return md5("[world.hub_password][text]").
Should be overridden to use a more unique salt, if you do not feel that your hub password is secure.
ID:91637
Jan 12 2010, 10:00 pm
|
|
http://www.byond.com/forum/?post=318642