Delphi and Kylix

Moderators: pritaeas
Number of threads: 7264
Number of posts: 19073

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Encrypt/Decrypt rtf file Posted by rajsha on 23 Aug 2005 at 9:27 PM
Is it possible to encrypt/decrypt a file while saving/opening it in a RichEdit component. Could someone let me have a routine to do it if its possible.
Thanx


Report
Re: Encrypt/Decrypt rtf file Posted by sziszi81 on 23 Aug 2005 at 9:48 PM
: Is it possible to encrypt/decrypt a file while saving/opening it in a RichEdit component. Could someone let me have a routine to do it if its possible.
: Thanx
:
:
:

how about descending a class from TRichEdit and overwriting SaveToFile and LoadFromFile procedures?

procedure TMyRichEdit.SaveToFile;
begin
{here you go through the TStringList object and encrypt it with whatever coding method you want}

inherit;
end;


and the same thing with LoadFromFile
Report
Re: Encrypt/Decrypt rtf file Posted by Koppis on 24 Aug 2005 at 11:05 AM
: : Is it possible to encrypt/decrypt a file while saving/opening it in a RichEdit component. Could someone let me have a routine to do it if its possible.
: : Thanx
: :
: :
: :
:
: how about descending a class from TRichEdit and overwriting SaveToFile and LoadFromFile procedures?
:
:
: procedure TMyRichEdit.SaveToFile;
: begin
: {here you go through the TStringList object and encrypt it with whatever coding method you want}
: 
: inherit;
: end;
: 

:
: and the same thing with LoadFromFile


You could also use SaveToStream within SaveToFile and encrypt a stream using free stream encryption code from the Internet and then save the stream to file. This way you can also use your favorite stream encryption algorithm.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.