# DO NOT VIEW WITH WORD WRAP ON!!! # This is an example security check file. The encryption is as follows: # 1) The score is doubled # 2) That is squared # 3) 13 is added to that # There are really two ways to do this: redo the sequence on the score and then compare # or undo the sequence on the security check and then compare. I will do both. You # should NOT include two methods in your security check. # Redoing sequence on score $new_score = $scored*2; # Double score $new_score = $new_score * $new_score; # Square that $new_score = $new_score + 13; # Add 13 to that if($new_score == $secure) # Compare { return "T"; # Passed } else { return "F"; # Failed } # Undoing sequence on security check $new_secure = $secure - 13; # Undo add 13 $new_secure = sqrt($new_secure); # Undo square $new_secure = $new_secure/2; # Undo double if($new_secure == $scored) # Compare { return "T"; # Passed } else { return "F"; # Failed }