son Posted September 10, 2008 Share Posted September 10, 2008 I would like to see an encrypted string on my screen (just for testing). I use: $pass = testing;$enc = SHA('$pass');var_dump ($enc); but it does not show. Is this not possible for security reasons?Son Link to comment Share on other sites More sharing options...
boen_robot Posted September 10, 2008 Share Posted September 10, 2008 The function's name is sha1() , not sha().There's also md5(), and if you're really into it, there's also the hash() function.As a side note, you should enable error display when testing, so that you could see such errors.... you know, a message like 'Call to an undefined function "hash"'. To do that, add ini_set('display_errors', 'On'); at the very top of your PHP code. Link to comment Share on other sites More sharing options...
son Posted September 10, 2008 Author Share Posted September 10, 2008 The function's name is sha1() , not sha().There's also md5(), and if you're really into it, there's also the hash() function.As a side note, you should enable error display when testing, so that you could see such errors.... you know, a message like 'Call to an undefined function "hash"'. To do that, addini_set('display_errors', 'On'); at the very top of your PHP code. Cheers, mate. Do this right away...Son Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.