How do I encrypt a richtextbox without loosing the format?

I'm trying to encrypt a richtextbox when I save it. I don't want to loose the format of the text I have.
Also I want to decode it to the richtext box when I open the file.
Anyone has any idea?
Any code is fine, it can be lame, the important thing is that the end user wont use the file outside of the program.
Thank you everyone.
igfpAsked:
Who is Participating?
 
ascii236Connect With a Mentor Commented:

Ok, I wrote you a small app.

http://dryrtf.freewebspace.com/

The file is DryRTF.zip
there is a link on the page.

let me know if you cant get it, I created that free website just for you. (sorry about the adds, but its free)
0
 
RhaedesCommented:
You want lame? Here's lame: just save the file with a '.exe' or '.dll' extension. None but the most intrepid of hackers would ever consider trying to open such a file... You want to get hard core, zip the file first then save it with one of these extensions. Otherwise just loop through each character in the TextRTF and add one to all the ascii codes. All pretty lame I know... it just depends on how much security you need.
In fact, the TextRTF is pretty esoteric as it stands, but if you need something better, I've written some code that compares a file with a random stretch of the Old Testament (or any long text string) and encodes accordingly. You have to provide the starting character number to decode.

Kindest regards,
Rhaedes
0
 
igfpAuthor Commented:
Sorry ascii236, I can't get the zip out. It says that it's not available. maybe you could send it to my e-mail:
ig_35646_fp@hotmail.com
I'm considering to try Rhaedes code. I'm supposed to save it without the SaveFile, using a print right?
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
igfpAuthor Commented:
I've tried again and again and I have the zip already, I will see the code in like 5 hours. Then I'll get back to you. Thank you.
0
 
igfpAuthor Commented:
It helped me a lot. Specially the Rich Text tags Thank You!
0
 
ascii236Commented:
:)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.