?
Solved

How do I encrypt a richtextbox without loosing the format?

Posted on 2003-02-26
6
Medium Priority
?
332 Views
Last Modified: 2010-05-01
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.
0
Comment
Question by:igfp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 5

Expert Comment

by:Rhaedes
ID: 8028963
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
 
LVL 2

Accepted Solution

by:
ascii236 earned 200 total points
ID: 8029847

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
 

Author Comment

by:igfp
ID: 8032035
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:igfp
ID: 8032057
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
 

Author Comment

by:igfp
ID: 8040995
It helped me a lot. Specially the Rich Text tags Thank You!
0
 
LVL 2

Expert Comment

by:ascii236
ID: 8043783
:)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month8 days, 6 hours left to enroll

766 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question