title: AES encryption using the Argon2 hash of a passcode, instead of the passcode directly - does it improve security?
body: <p>Say I want to encrypt a file <code>mydata.txt</code> using a hard to guess password such as <code>Passw0rd!</code>, but I am concerned the end-user might misunderstand what a hard to guess password is and may inadvertently or unknowingly use a password less secure than desired for the application.</p>
  <p>Can I use Argon2 to &quot;make&quot; even easy password hard to guess for AES (or similar) encryption? Here is how I picture this to happen.</p>
  <ol>
  <li>I have a file <code>mydata.txt</code>, then the user supplies a secret string <code>pass14988</code>.</li>
  <li>My application uses Argon2 to hash the pasword securely <code>hash = Argon2(&quot;Passw0rd!&quot;)</code>.</li>
  <li>My application uses <code>hash</code> has the password to AES.</li>
  <li>For decryption, it follows that the encryption file must always include a copy of the salt and Argon2 settings (but obviously not the unique hash).</li>
  </ol>
  <p>Now any malicious user attempting to decrypt the file will have to run Argon2 on each guess in addition to the difficulty inherent to AES.</p>