After urlDecode processes the text, it replaces all ‘+’ chars with ‘ ‘ … thus the error. You should simply call this statement to make it base 64 compatible again:
sEncryptedString = sEncryptedString.Replace(' ', '+');
After urlDecode processes the text, it replaces all ‘+’ chars with ‘ ‘ … thus the error. You should simply call this statement to make it base 64 compatible again:
sEncryptedString = sEncryptedString.Replace(' ', '+');