"Some character in unsupported" — is already the absurd. Never ever try to encrypt characters. First, serialize all data into array of bytes,
byte[]
; it can be done using one of
System.Text.Encoding
classes:
http://msdn.microsoft.com/en-us/library/system.text.encoding%28v=vs.110%29.aspx[
^].
And, of course, only use UTF encodings, better be UTF-8.
Then do encryption, and, when you need it, the reverse operations: decryption and getting strings from
byte[]
.
See also:
http://msdn.microsoft.com/en-us/library/System.Security.Cryptography%28v=vs.110%29.aspx[
^].
Sorry, but digging in your code is just not interesting. Why wasting any time which already makes no sense?
—SA