md5 - How can I sanitise input for a hash converter in PHP? -


I created a website that generates a hash from users who input plain text, the user can enter a word / phrase And can choose from MD5 or SHA1 (or both) site then takes this input and converts it to MD5; SHA1 and store it in a database, then returns it to the user. The user can also hash in a search bar, and if the database is hash, then it will return the original word, providing the users with the benefit of the crowd-level Hash is to create tables. I am getting main functionality, but I have a dilemma of what I should do, I want the users to input special characters, because this will result in the search function, any advice would be appreciated, thanks.

You should not clean anything if it is just being washed, since the hashing functions generally There are no insecure against injection attacks.

You should clean all your database inputs (both for entry and search). However, unless you are using an archive database API, which does not support parameterized queries (such as mysql _ * functions; to avoid avoiding them), it's automatic Will be done in the form.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -