Encrypt/Decrypt rtf file

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

  • : 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
  • : : 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.

Howdy, Stranger!

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

Categories