View Single Post
  #8  
Old 06-11-2010, 05:23 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Here's a fun example of keeping a password secure. Let's say you have a password, "test" and you don't want any other scripter to know that the password is "test." You could do:
PHP Code:
function onPlayerChats() {
  if (
md5(player.chat) == "098f6bcd4621d373cade4e832627b4f6") {
    
setlevel2("testlevel.nw"3030);
  }

Now simply say "test", and it'll warp you to testlevel.nw. Since there is no way to "decrypt" md5 other than brute force, this is a secure way to store odd passwords such as the password "aU4vOlz1" since they are not easily brute forced.

If you want to know the md5 of a string, you can do echo(md5("test"));
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote