Encrypt/Decrypt rtf file - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Encrypt/Decrypt rtf file

rajsharajsha Posts: 75Member
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


Comments

  • sziszi81sziszi81 Posts: 80Member
    : 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?

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

    inherit;
    end;
    [/code]

    and the same thing with LoadFromFile
  • KoppisKoppis Posts: 68Member
    : : 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?
    :
    : [code]
    : procedure TMyRichEdit.SaveToFile;
    : begin
    : {here you go through the TStringList object and encrypt it with whatever coding method you want}
    :
    : inherit;
    : end;
    : [/code]
    :
    : 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.
Sign In or Register to comment.