主权项 |
1. A method of securing data, the method comprising:
writing a data field to a location in a memory, the data field comprising a payload and a token associated with the payload; reading out the payload and the token from the location in the memory, wherein the token indicates a number of times the payload is encrypted; encrypting the payload read from the memory location; incrementing the token read from the memory location; writing the encrypted payload and the incremented token back to the memory location; and periodically repeating the reading, encrypting, incrementing and writing back in response to a signal from a timer to avoid data imprinting; and in response to reading the token and a value of the token being less than a selected value, performing the encrypting, incrementing, and writing back to the memory location; and in response to reading the token and a value of the token being equal to the selected value, performing operations including: decrypting the payload a number of times; decrementing the token by the number of times; and writing the payload decrypted the number of times and the decremented token back to the memory location. |