title: How to encrypt string in Java using Windows DPAPI using the system context instead of the user context?
body: <p>I'm trying to encrypt a password to be stored across multiple instances of my program, but it needs to be able to be decrypted by all users on the machine. I have already looked around for options, and had <a href="http://jdpapi.sourceforge.net/" rel="nofollow noreferrer">javaDPAPI</a> recommended to me. However, this only seems to encrypt based on the current user context. </p>
  
  <p>Based on <a href="https://docs.microsoft.com/en-us/windows/desktop/api/dpapi/nf-dpapi-cryptprotectdata" rel="nofollow noreferrer">microsoft's documentation</a> there seems to be a way to do this, but I am not sure how to do this and I am not very familiar with java and have never done something like this.</p>