2017-02-25 20:24 GMT+01:00 Alexander Ilin <ajs...@yandex.ru>: > Thanks for the links to those who replied. I agree that the proper way > seems to be to store the encryption key in a malloc'd buffer, which would > take it out of reach of the GC.
That's a very interesting question. Clearly, you need to allocate a buffer for it outside the gc-managed heap. But I wonder if that is sufficient. Freeing doesn't clear the buffer, and if you malloc again, the buffer can be reused for that allocation. Clearing with memset could also fail to get rid of the data if the memory system decides to play optimization tricks. -- mvh/best regards Björn Lindqvist ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk