How can I increase memory security in Delphi?

前端 未结 11 1656
醉酒成梦
醉酒成梦 2020-12-11 09:50

Is it possible to \"wipe\" strings in Delphi? Let me explain:

I am writing an application that will include a DLL to authorise users. It will read an encrypted file

11条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-11 10:11

    If you use the FastMM memory manager in Full Debug mode, then you can force it to overwrite memory when it is being freed.

    Normally that behaviour is used to detect wild pointers, but it can also be used for what your want.

    On the other hand, make sure you understand what Craig Stuntz writes: do not write this authentication and authorization stuff yourself, use the underlying operating system whenever possible.

    BTW: Hallvard Vassbotn wrote a nice blog about FastMM: http://hallvards.blogspot.com/2007/05/use-full-fastmm-consider-donating.html

    Regards,

    Jeroen Pluimers

提交回复
热议问题