Skip to main content
Post Closed as "Duplicate" by Dharman php
Tags in title (http://meta.stackexchange.com/q/19190)
Link
jww
  • 103.6k
  • 107
  • 453
  • 975

PHP Password Encryption Handling Encrypt password before storing in database?

Source Link
BigMike
  • 1.1k
  • 3
  • 23
  • 34

PHP Password Encryption Handling

I have a password being passed from my iPhone app to the database via a php script, user.php.

The variable $pass is populated by the following:

$pass = str_replace("'", "", $_REQUEST['pass']); 

How can I encrypt this before it's inserted into my database? I've read a little about the different techniques, but looking for the best way to manage this.

Thanks to everyone.