when I hash my password using hash('sha512', $salt . $password);
, should the maximum length in the password column in the database be 512 or does it matter if it gets chopped down? Or can it possibly be longer than 512? Thanks.
SHA512 actually returns a string of 128 length. So the short answer is, your field only needs to be 128 characters.
SHA512 outputs 512 bits, or 64 bytes. You can store those 64 bytes in a binary column, which are represented by 128 hexadecimal numbers...
Hense you need 128 size..
For remainig See here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With