Page 1 of 1

Storing binary data in mysql blob

Posted: Sun Dec 20, 2009 5:17 am
by scatty1985
Hi,

I've been reading kaisellgren blog on hashing and am trying to store some random binary data from /dev/urandom into the db. I read that mysql_real_escape_string() can be used to insert the data but read that it will get mallformed into the database?

How can I store the binary data so that it can be used to salt a password?

Re: Storing binary data in mysql blob

Posted: Tue Dec 22, 2009 6:59 am
by kaisellgren
It's the other way around: if you don't escape, you will get your data corrupted at some point. So escaping here is not just about security.