I am trying to understand if my database password encryption structure is good, or not much use.
So when i register, the php will generate a 50 character random key, and that key will be put into a db table called hash tagged against the user id, then the hash will be used to AES encrypt the password and the password will be stored in another table.
When a user login, the hash will be pulled out and use for decryption. And if the login is successful, the hash key will be replaced with a newly generated one for next use etc.....
I am not sure if this is good idea or not, any feedback is good thanks!