Is there a way to securely save sensitive data, such as AES encryption key, in Windows? I'd like to make the data available only to my program. I know that DPAPI (CryptProtectData / CryptUnprotectData) protects my data from the access from other user's process, but it doesn't protect from unwanted program once it is ran by the same user.
I was hoping there's some API that automatically uses calling process image file's information (such as the hash of the image file) to protect / unprotect the data, but I couldn't find such API in MSDN.