We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Save crypt and not base64 values in MySQL

Hi there,

I'm not able to store encripted nonbase64 text through phsql into mySQL. I'm also not able to compare the values when i retrieve them(I've inserted binary manually but when i compare it I cannot manage to reach an equal state, this without even encription). With BASE64 and varchar type works perfect.

edited Apr '15

It's generally a bad idea to store raw encrypted values in a database because of not being able to translate the data into literal characters, but that all depends on how you're actually handling the data.

ie. Can you please provide some context as to how you're using the data? (Provide some relevant code of how you're handling the data)

Is the MySQL column a BLOB type? if not, what is the type? etc.