Well I ran into a small problem recently, kind of your typical issue of skipping over something small.
When you use AES_DECRYPT in mySQL you’ll run into an issue with sending it over ASP.NET this is because .NET has some issues with BLOB types.. basically .Net doesn’t like BLOBs.
So to fix this small error, instead of having th typical code:
Select AES_DECRYPT(column,’myKey’) As alias FROM table;
Change it to:
Select CAST(AES_DECRYPT(column,’myKey’) AS CHAR(#)) AS alias FROM table;
All this does is cast/convert the BLOB into a char string which .NET can easily handle! Hope this helps anyone who runs into this issue.
Thanks for your post, it was very helpful
Comment by Cesar — September 29, 2008 @ 5:42 am
thank you very much!!!!
Comment by Anonymous — November 2, 2011 @ 11:32 pm