Re: SHA Question



Swapping does not always happen and not immediately, what you should do
is to clear out the variables, it's not brainsurgery: If you have a x
byte char (maby for an encryption key), just fill it out with data when
you're done encrypting.

Increasing thread priority to THREAD_BASE_PRIORITY_LOWRT do not prevent
data to be swapped to the pagefile, it just takes more processing power
from the system. When the program returns from having it's share of the
timecake, things may happen.

Sure, you CAN do a SetThreadPriority(hThread,
THREAD_BASE_PRIORITY_LOWRT), Encrypt or Decrypt, clear out variables,
then SetThreadPriority() to normal to make it harder for any other
process from issuing SuspendThread() to take a look or try injecting
data into the process/thread.

The immediate drawback of running a thread at that priority is that the
user will notice a total lock up of the system, if your intended end
users can live with that, everything should be fine.

.