sending a DataTable through RSA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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]
- (e-mail address removed)

Eric said:
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?
 
Back
Top