Hi All,
This is one of those strange questions when I'm not even sure what to google for!
But here's my problem, I'm using Rijndael encryption to encrypt some values in the database. I can pull back this cipher text fine, but then I need to pass this to a generic handler through the query string.
So if the DB record looks like this:
WLIOrjH/zKAEGNSU6XHaqYoXFLmEZ6Y4KBLjpCQowIxGNfS/btNfn2Je72DT2zm4fIpZSLepR/DwIGdtyUJ+zb+DIkItdYhLwaqvEiX9Y+BuS6F0vAfNj0HV1PR6g6z347QXgN1L2bgL2QrzeySBSQ==
The query string will look like this:
WLIOrjH%2fzKAEGNSU6XHaqYoXFLmEZ6Y4KBLjpCQowIxGNfS%2fbtNfn2Je72DT2zm4fIpZSLepR%2fDwIGdtyUJ+zb+DIkItdYhLwaqvEiX9Y+BuS6F0vAfNj0HV1PR6g6z347QXgN1L2bgL2QrzeySBSQ%3d%3d
Notice how the "=" have been change to %3d etc. Now when I assign this version of the cipher text to a string it changes to the following:
WLIOrjH/zKAEGNSU6XHaqYoXFLmEZ6Y4KBLjpCQowIxGNfS/btNfn2Je72DT2zm4fIpZSLepR/DwIGdtyUJ zb DIkItdYhLwaqvEiX9Y BuS6F0vAfNj0HV1PR6g6z347QXgN1L2bgL2QrzeySBSQ==
This time notice the "+" have been lost and replace by a space. This then breaks me decryption method and an error is thrown.
I'm guessing I need to do some form of encoding but i'm not sure were to start.
Any ideas?
Phil