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

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.