Page 1 of 1

Is there an option to save files encrypted?

Posted: Fri Sep 20, 2013 10:14 am
by MPirnstill
Hi,

the Situation is, that typing tests are writing with my program, that uses the ScaledRichview component. These test are saved encrypted, to prevent Manipulation afterwards. I only can be reloaded into my program in read only state.

But now I have a Problem. The encryption dll I use expects simple text, but this way I loose the line breaks and paragraphs.

Is there an Option to save text from the richview component in some Kind of encrypted form, so it will be save from Manipulations?

Posted: Sat Sep 21, 2013 6:42 am
by Sergey Tkachenko
You need to use an external encryption library that supports arbitrary binary data.

Posted: Wed Sep 25, 2013 5:58 pm
by hruslan2000

Posted: Thu Sep 26, 2013 2:17 pm
by MPirnstill
Thanks for the reply hruslan.

In the meantime I found out that the line breaks, that are in the string I get from GetAllText are included and that my DLL encrypts and decrypts the text and line breaks correctly.

I seen the text in the same Format in the debug window.
So I must be using the wrong method to get the text back into the TRichviewEdit.

I simply used Add, but that isn't appearently the right way.
I will search the help, but if anyone knows the right method
I would appreciate a hint. ;-)

Posted: Thu Sep 26, 2013 5:31 pm
by Sergey Tkachenko
Use AddTextNL to add multiline text

Posted: Fri Sep 27, 2013 6:00 am
by MPirnstill
It worked. Thanks.