Text Data - Signing/Encrypting?

  • Thread starter Thread starter Derrick
  • Start date Start date
D

Derrick

Hi All,

I wrote an app that reads text and/or xml data, will call it our "content".
We want to secure that content so that our app will know if someone has
modified it, or has produced their own content. I'm guessing I want some
sort of key generation based on the content to go along with the file? Can
anyone point me at an article or suggest a way to do this?

I've seen the encrypt/decrypt packages, but we don't want to encrypt.

Thanks in advance!

Derrick
 
Derrick,

If you are not worried about the content being read, but just being
modified, then I would suggest hashing the message, and then encrypting the
hash.

You can use the classes in the System.Security.Cryptography namespace to
do this.

Hope this helps.
 
Derrick said:
I wrote an app that reads text and/or xml data, will call it our "content".
We want to secure that content so that our app will know if someone has
modified it, or has produced their own content. I'm guessing I want some
sort of key generation based on the content to go along with the file? Can
anyone point me at an article or suggest a way to do this?

I've seen the encrypt/decrypt packages, but we don't want to encrypt.

You basically want a hash - look at the
System.Security.Cryptography.MD5 class, and its ComputeHash method.

(You'll need to convert your text data into binary data using an
Encoding - I suggest using Encoding.UTF8.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top