Friday, May 11, 2012

Invalid length for a Base-64 char array

I was having an issue while converting a cipher values to base64 string , it was working smooth ,suddenly it started throwing exception invalid length for a base-64 char array .
I was sending text from an android app and was converting in server app.
issue i found was while posting text to server + sign was converted into space " " , after converting back into "+" sign it worked for me , like
s=s.Replace(" ", "+");

thanks to post from Kiranpatils at
http://kiranpatils.wordpress.com/2008/03/13/invalid-length-for-a-base-64-char-arrayrijandelmanagedencryption/

No comments:

Post a Comment