2011-09-24, 06:55 PM
Hello MyBaBies,
I was just looking around for **the best** encryption method in PHP before inserting in a SQL database or in a file... and I just found out that:
The best encryption method/hash
the hash of 0 using sha512 is:
31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99
the hash of 1 using sha512 is:
4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a
WOW!
WARNING:
Never use the MySQL PASSWORD() function, as said in MySQL Docs:
So if you are doing something like:
You should really change that for your safety!
Hope I helped
I was just looking around for **the best** encryption method in PHP before inserting in a SQL database or in a file... and I just found out that:
$password = md5($password);
can be decrypted! Security rating: 2.5/5$password = sha1($password);
can be decrypted, with a lot of work! Security rating: 3.5/5The best encryption method/hash
$password = hash("sha512", $password);
Security rating: 4.9/5 (for now)the hash of 0 using sha512 is:
31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99
the hash of 1 using sha512 is:
4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a
WOW!
WARNING:
Never use the MySQL PASSWORD() function, as said in MySQL Docs:
Quote:The PASSWORD() function is used by the authentication system in MySQL Server; you should not use it in your own applications.
So if you are doing something like:
$sql = mysql_query("INSERT INTO users ('username', 'password') VALUES ('$username', PASSWORD('$password')")
OR DIE mysql_error();
You should really change that for your safety!
Hope I helped