Commit 9c29138c authored by Bruce Momjian's avatar Bruce Momjian

docs: clarify references to md5 hash and md5 crypt in pgcrypto docs

Suggestion from Richard Neill
parent 9299f617
...@@ -95,8 +95,8 @@ hmac(data bytea, key text, type text) returns bytea ...@@ -95,8 +95,8 @@ hmac(data bytea, key text, type text) returns bytea
</para> </para>
<para> <para>
The algorithms in <function>crypt()</> differ from usual hashing algorithms The algorithms in <function>crypt()</> differ from the usual
like MD5 or SHA1 in the following respects: MD5 or SHA1 hashing algorithms in the following respects:
</para> </para>
<orderedlist> <orderedlist>
...@@ -142,6 +142,7 @@ hmac(data bytea, key text, type text) returns bytea ...@@ -142,6 +142,7 @@ hmac(data bytea, key text, type text) returns bytea
<entry>Max Password Length</entry> <entry>Max Password Length</entry>
<entry>Adaptive?</entry> <entry>Adaptive?</entry>
<entry>Salt Bits</entry> <entry>Salt Bits</entry>
<entry>Output length</entry>
<entry>Description</entry> <entry>Description</entry>
</row> </row>
</thead> </thead>
...@@ -151,6 +152,7 @@ hmac(data bytea, key text, type text) returns bytea ...@@ -151,6 +152,7 @@ hmac(data bytea, key text, type text) returns bytea
<entry>72</entry> <entry>72</entry>
<entry>yes</entry> <entry>yes</entry>
<entry>128</entry> <entry>128</entry>
<entry>60</entry>
<entry>Blowfish-based, variant 2a</entry> <entry>Blowfish-based, variant 2a</entry>
</row> </row>
<row> <row>
...@@ -158,6 +160,7 @@ hmac(data bytea, key text, type text) returns bytea ...@@ -158,6 +160,7 @@ hmac(data bytea, key text, type text) returns bytea
<entry>unlimited</entry> <entry>unlimited</entry>
<entry>no</entry> <entry>no</entry>
<entry>48</entry> <entry>48</entry>
<entry>34</entry>
<entry>MD5-based crypt</entry> <entry>MD5-based crypt</entry>
</row> </row>
<row> <row>
...@@ -165,6 +168,7 @@ hmac(data bytea, key text, type text) returns bytea ...@@ -165,6 +168,7 @@ hmac(data bytea, key text, type text) returns bytea
<entry>8</entry> <entry>8</entry>
<entry>yes</entry> <entry>yes</entry>
<entry>24</entry> <entry>24</entry>
<entry>20</entry>
<entry>Extended DES</entry> <entry>Extended DES</entry>
</row> </row>
<row> <row>
...@@ -172,6 +176,7 @@ hmac(data bytea, key text, type text) returns bytea ...@@ -172,6 +176,7 @@ hmac(data bytea, key text, type text) returns bytea
<entry>8</entry> <entry>8</entry>
<entry>no</entry> <entry>no</entry>
<entry>12</entry> <entry>12</entry>
<entry>13</entry>
<entry>Original UNIX crypt</entry> <entry>Original UNIX crypt</entry>
</row> </row>
</tbody> </tbody>
...@@ -205,7 +210,7 @@ UPDATE ... SET pswhash = crypt('new password', gen_salt('md5')); ...@@ -205,7 +210,7 @@ UPDATE ... SET pswhash = crypt('new password', gen_salt('md5'));
<para> <para>
Example of authentication: Example of authentication:
<programlisting> <programlisting>
SELECT pswhash = crypt('entered password', pswhash) FROM ... ; SELECT (pswhash = crypt('entered password', pswhash)) AS pswmatch FROM ... ;
</programlisting> </programlisting>
This returns <literal>true</> if the entered password is correct. This returns <literal>true</> if the entered password is correct.
</para> </para>
...@@ -353,7 +358,7 @@ gen_salt(type text [, iter_count integer ]) returns text ...@@ -353,7 +358,7 @@ gen_salt(type text [, iter_count integer ]) returns text
<entry>12 years</entry> <entry>12 years</entry>
</row> </row>
<row> <row>
<entry><literal>md5</></entry> <entry><literal>md5 hash</></entry>
<entry>2345086</entry> <entry>2345086</entry>
<entry>1 day</entry> <entry>1 day</entry>
<entry>3 years</entry> <entry>3 years</entry>
...@@ -380,7 +385,7 @@ gen_salt(type text [, iter_count integer ]) returns text ...@@ -380,7 +385,7 @@ gen_salt(type text [, iter_count integer ]) returns text
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
<literal>md5</> numbers are from mdcrack 1.2. <literal>md5 hash</> numbers are from mdcrack 1.2.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
...@@ -1343,7 +1348,7 @@ gen_random_bytes(count integer) returns bytea ...@@ -1343,7 +1348,7 @@ gen_random_bytes(count integer) returns bytea
<entry>OpenBSD sys/crypto</entry> <entry>OpenBSD sys/crypto</entry>
</row> </row>
<row> <row>
<entry>MD5 and SHA1</entry> <entry>MD5 hash and SHA1</entry>
<entry>WIDE Project</entry> <entry>WIDE Project</entry>
<entry>KAME kame/sys/crypto</entry> <entry>KAME kame/sys/crypto</entry>
</row> </row>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment