I am trying to create a secure login app using php and MySQLi by following this tutorial: Link To Tutorial The tutorial is using a table(members) with 5 fields as:"id", "username","email","password",and "salt". but at the very beginning there is a an SQL INSERT function which is confusing me
INSERT INTO `secure_login`.`members` VALUES(1, 'test_user', 'email@example.com', 00807432eae173f652f2064bdca1b61b290b52d40e429a7d295d76a71084aa96c0233b82f1feac45 529e0726559645acaed6f3ae58a286b9f075916ebf66cacc', 'f9aab579fc1b41ed0c44fe4ecdbfc db4cb99b9023abb241a6db833288f4eea3c02f76e0d35204a8695077dcf81932aa59006423976224be0 390395bae152d4ef');
I am guessing the fist long number is a sha512() salted password so I used this php code to generate my sha512 password and insert it to my members database:
<?php $password = 'newPassword'; echo 'sha512: ' . hash('sha512', $password); ?>
and the result is: sha512: 6f63f637f1346149532158022899bdf424a19c3dc472e21c2068cd324d7263ed521fb1c1335afaad6bf3fd94a24c0371217086295255e7773eb8deb2c7a54e1a
Now my question is what is the the the second value which is inserting into the "salt" field?
Unforgettably I couldn't find a way to contact to tutorial person but I tought you may can help me to figure this out.so, Can you please let me know 1- Am i doing the sha512 password salting correctly? 2- What is the last item inserted into members table(salt) , how I can generate that one?
Thanks for you time