</para>
<para>
- The algorithms in <function>crypt()</> differ from usual hashing algorithms
- like MD5 or SHA1 in the following respects:
+ The algorithms in <function>crypt()</> differ from the usual
+ MD5 or SHA1 hashing algorithms in the following respects:
</para>
<orderedlist>
<entry>Max Password Length</entry>
<entry>Adaptive?</entry>
<entry>Salt Bits</entry>
+ <entry>Output length</entry>
<entry>Description</entry>
</row>
</thead>
<entry>72</entry>
<entry>yes</entry>
<entry>128</entry>
+ <entry>60</entry>
<entry>Blowfish-based, variant 2a</entry>
</row>
<row>
<entry>unlimited</entry>
<entry>no</entry>
<entry>48</entry>
+ <entry>34</entry>
<entry>MD5-based crypt</entry>
</row>
<row>
<entry>8</entry>
<entry>yes</entry>
<entry>24</entry>
+ <entry>20</entry>
<entry>Extended DES</entry>
</row>
<row>
<entry>8</entry>
<entry>no</entry>
<entry>12</entry>
+ <entry>13</entry>
<entry>Original UNIX crypt</entry>
</row>
</tbody>
<para>
Example of authentication:
<programlisting>
-SELECT pswhash = crypt('entered password', pswhash) FROM ... ;
+SELECT (pswhash = crypt('entered password', pswhash)) AS pswmatch FROM ... ;
</programlisting>
This returns <literal>true</> if the entered password is correct.
</para>
<entry>12 years</entry>
</row>
<row>
- <entry><literal>md5</></entry>
+ <entry><literal>md5 hash</></entry>
<entry>2345086</entry>
<entry>1 day</entry>
<entry>3 years</entry>
</listitem>
<listitem>
<para>
- <literal>md5</> numbers are from mdcrack 1.2.
+ <literal>md5 hash</> numbers are from mdcrack 1.2.
</para>
</listitem>
<listitem>
<entry>OpenBSD sys/crypto</entry>
</row>
<row>
- <entry>MD5 and SHA1</entry>
+ <entry>MD5 hash and SHA1</entry>
<entry>WIDE Project</entry>
<entry>KAME kame/sys/crypto</entry>
</row>