Clearing memory securely and reallocations

前端 未结 5 1791
别跟我提以往
别跟我提以往 2020-12-24 07:11

Following the discussion here, if you want to have a secure class for storing sensitive information (e.g passwords) on memory, you have to:

  • memset/clear the me
5条回答
  •  不知归路
    2020-12-24 08:08

    I would suggest that the way to do it is to encrypt the data in memory. In that way, the data is always secure whether it is still in memory or not. The drawback, of course, is an overhead in terms of encrypting/decrypting the data each time it is accessed.

提交回复
热议问题