Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Storing password hashes

In tutorials about web app security all example databases have character-typed fields for hashes. Are there any (security) reasons to store password hashes as Base64-encoded string. Why not store it as binary blob?

like image 700
Vsevolod Poletaev Avatar asked Feb 20 '26 22:02

Vsevolod Poletaev


1 Answers

No, there are no security reasons for this, as the data stored is the same (just a different format). However, there are practical reasons: it is much easier to compare a Base64 string in your database with one from a log file, for example. This helps with debugging.

like image 105
Glorfindel Avatar answered Feb 25 '26 06:02

Glorfindel