I'm using .NET's RijndaelManaged class to encrypt and decrypt strings.
You may be using that as the underlying encryption - but RijndaelManaged only deals with binary data, as is normally the case with encryption code.
So presumably you're converting your string into bytes (hopefully using a sensible encoding such as UTF-8), then encrypting, then converting the encrypted bytes back into a string.
Without knowing how you're converting the encrypted bytes back into a string, we can't possibly know whether the results will include a |
. If you're using Convert.ToBase64String
(which is probably what I'd use) you'll be fine, as |
isn't used within the normal base64 alphabet. Ditto if you're just converting each byte into two hex digits. But maybe you're doing something else. (If you're using Encoding
, you're doing it wrong by the way, and can easily lose data.)