I'm writing program that load encoded string into memory and decode it with special algorithm.
Sequences of program work:
- Load data from encoded file (
base64
string) - Decode
base64
string to encoded data string (Rijndael 256
) - Decode encoded data string (
Rijndael256
) to plain text code - Run code and store state in data structure
- Delete plain text from memory
- ...
The problem is in sequence #3
if user create dump of program memory, he can get code as plain text which must be secure.
My question is - there is any way to protect my plain text string in memory?
Program is written in C++
.