Your "string" is not portable (it isn't even a string). Whence, storing it as a string in your database isn't a good thing to do. Try encoding it in base64 after your encryption, and store the result (which will be a clean portable string).
An alternative solution is to store your encrypted value as binary data.

In fact, following your link, those are the first 2 answers...

--
Erwann ABALEA

Le 28/03/2013 19:08, Jevin Sonut a écrit :
hi,

i have encrypted a string using Blowfish from Openssl library

i got the following string A▓☼LÝ$øä²↓j╗ú¤Ä:ðï▲

i inserted the data into my database BUT when i retrieved the data i got A¦¤LÝ$øä²?j+ú¤Ä:ðï? (NOT same to the original the one i inserted)

thus when i decrypt the loaded string from the database i donot get the original string

Can anyone ply help to solve the problem

i'm using SQLITE and c/c++

I google the problem but came along a c# solution http://stackoverflow.com/questions/8389412/md5-encrypted-string-returns-different-from-database-than-it-is-inserted

Can anyone PLZ help

From:-
Shanil J.S




Reply via email to