title: Scala: using jOOQ DSL with boolean methods
body: <p>I have this jOOQ 3.14.4, Scala 2.13 code, that is mixed with some deprecated <code>Play</code> code:</p>
  <pre><code>val user = Option(sql
    .selectFrom(USER)
    .where(USER.EMAIL.equal(email))
    .and(USER.PASSWORD.equal(crypto.sign(password)))
    .fetchOne())
  </code></pre>
  <p>Note that <code>email</code> and <code>password</code> are <code>String</code>s.</p>
  <p>Now, I want to replace the code that uses the <code>Play</code> deprecated <code>Crypto</code> with a new Java method (which I got from the <code>jBCrypt</code> library):</p>
  <pre><code>public static boolean checkpw(String plaintext, String hashed)
  </code></pre>
  <p><strong>1. How can I use <code>BCrypt.checkpw(...)</code> inside the jOOQ code?</strong></p>
  <p><code>equal</code> does not return a boolean, and how do I extract the actual String value in the USER.PASSWORD <code>TableField</code>?</p>
  <p>Example of using the <code>BCrypt.checkpw</code> method:</p>
  <pre><code>// Check that an unencrypted password matches one that has
  // previously been hashed
  if (BCrypt.checkpw(candidate, hashed))
      System.out.println(&quot;It matches&quot;);
  else
      System.out.println(&quot;It does not match&quot;);
  </code></pre>
  <p><strong>2. Is <code>jBCrypt</code> considered secure, from a cryptographic point of view, for the purpose of encrypting passwords for saving them in a production database?</strong></p>