![]() |
encryption and security
Well, I have a bunch of questions to ask, but I will start with this one.
When I read tutorials, articles or topics on the internet about security I often read the following thing: Code:
<?php The code would then become like this: Code:
<?php |
Yes, you're right. The MD5 function will return a string only ever containing 32 hexadecimal (0-9a-f) characters so there's no need to escape that.
|
Thank you, I just wanted to know sure.
|
Although that is correct and there are no security implications in such code, you must remain consistent if you're not going to escape passwords. Take the following as a key example as to why you must remain consistent in either escaping or not escaping:
php Code:
As you can see, the two MD5 strings now differ because the former has no slashes, and the latter has slashes to escape the single quotes. |
| All times are GMT. The time now is 12:22 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0