I use a certain API key a couple of times while the application is running, so I declare it as MyAPIKey : ISecureString; and call MyAPIKey.Data in different procedures at different times. In this case, what happens in memory after a call to MyAPIKey.Data in some procedure? Is the MyAPIKey (encrypted byte array or string) automatically cleared when procedure is done or goes out of scope? Is it safe to declare ISecureString as a global variable and use anywhere within the application?
Also, can your library be used together with ProtectedMemory-Delphi (https://github.com/shadiajam/ProtectedMemory-Delphi) to enhance security in memory? If so, an example will be much appreciated. Thank you.
I use a certain API key a couple of times while the application is running, so I declare it as MyAPIKey : ISecureString; and call MyAPIKey.Data in different procedures at different times. In this case, what happens in memory after a call to MyAPIKey.Data in some procedure? Is the MyAPIKey (encrypted byte array or string) automatically cleared when procedure is done or goes out of scope? Is it safe to declare ISecureString as a global variable and use anywhere within the application?
Also, can your library be used together with ProtectedMemory-Delphi (https://github.com/shadiajam/ProtectedMemory-Delphi) to enhance security in memory? If so, an example will be much appreciated. Thank you.