title: Perl Mojo::Util::secure_compare vs eq
body: <p>In the <a href="https://metacpan.org/pod/Mojo::Util#secure_compare" rel="nofollow"><code>Mojo::Util</code></a> documentation for the method <code>secure_compare</code> it mentions</p>
  
  <blockquote>
    <p>Constant time comparison algorithm to prevent timing attacks.</p>
  </blockquote>
  
  <p>Suppose I hash user input like this</p>
  
  <pre><code>my $b64_hash = Crypt::ScryptKDF::scrypt_b64($input_name, $secret);
  </code></pre>
  
  <p>is there any difference between result between</p>
  
  <pre><code>return Mojo::Utill::secure_compare($input_name_hash, $b64_hash);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>return $input_name_hash eq $b64_hash;
  </code></pre>