I need to send an encrypted DataTable through RSA. How can I serialize it, deserialize it, then turn the byte array back into a DataTable object?
sending a DataTable through RSA
Collapse
This topic is closed.
X
X
-
EricTags: None
-
Nicholas Paldino [.NET/C# MVP]
Re: sending a DataTable through RSA
Eric,
Since the DataTable can be represented as XML, you can just call the
Save method on the DataSet it is a part of. You can use this to save to a
StringWriter instance to write the contents to a string. Once you have
that, you can encrypt it any way you like, and transmit it. You can use the
classes in the System.Security .Cryptography namespace to handle the
encryption and decryption of the text. To get the text into an array of
bytes, you can use the Unicode or AsciiEncoding classes in the System.Text
namespace.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard. caspershouse.co m
"Eric" <anonymous@disc ussions.microso ft.com> wrote in message
news:62F778C0-E31E-45CE-BA90-223D84B2205C@mi crosoft.com...[color=blue]
> I need to send an encrypted DataTable through RSA. How can I serialize[/color]
it, deserialize it, then turn the byte array back into a DataTable object?
Comment