Need to encrypt text output

Logging is fine, but I have to log license and other sensitive information additional, so I need to encrypt the output. Is there any way to capture the data before they are written, so I can apply encryption to them? I only need to out out in plain text.

Hi,



To accomplish this you'll need to write your own outputhandler or use the OnOutput event that is triggered when a log event occurs. There is currently no alternative to encrypt the content before it is sent to one of the attached outputhandlers. Creating your own encrypted outputhandler based on an existing one should be fairly easy. You could also start from a new outputhandler unit.

I tried to use the aes component (tms) in the TMSLoggingTextOutputHandler.pas, and the moment I add aes:=TAESEncryption.Create; my program just silently exit without exception or anything.

Even a breakpoint at that code wont stop it from quitting.

I added in the TMSLoggingTextOutputHandler.pas the units:
MiscObj, AESObj, RSAObj, ECCObj, SPECKOBj, SalsaObj, HashObj

No issue, it runs.

Then I added aes:=TAESEncryption.Create; to the function TTMSLoggerTextOutputHandler.GetOutputText and it wont run any longer and immediately quit.

Hi, 


Did you try this outside of any logging output handler just to be sure the code executes correctly?
What do you mean with "outside of any logging output handler"? The AES? Yes, it works fine in any other module.

Hi, 


It's unclear exactly what is going wrong, are you getting an exception, invalid pointer or access violation or similar issues?