Secure way to store password in Windows
I'm trying to protect a local database that contains sensitive info (similar to this question , only for delphi 2010 ) I'm using DISQLite component , which does support AES encryption, but I still need to protect this password I use to decrypt & read the database. My initial idea was to generate a random password, store it using something like DPAPI ( CryptProtectData and CryptUnprotectData functions found in Crypt32.dll), but I couldn't find any example on that for Delphi My question is: how can I safely store a randomly generated password? Or, assuming the DPAPI road is secure, how can I