How to store passwords in DB?

Key takeaways
- Hệ thống generate ra 1 cái salt bất kỳ. Combo nó với password.
encrypted_password = salt + Hash(password + salt)lại, lưu vào DB- Khi người dùng đăng nhập bằng mật khẩu, tách slat từ
encrypted_password, sau đó thực hiện lại hàm hash. Lấy kết quả thu được để compare vớiencrypted_passwordtrong DB.