]> granicus.if.org Git - apache/commitdiff
Merge r1721975 from trunk:
authorEric Covener <covener@apache.org>
Mon, 28 Dec 2015 18:27:27 +0000 (18:27 +0000)
committerEric Covener <covener@apache.org>
Mon, 28 Dec 2015 18:27:27 +0000 (18:27 +0000)
PR58764: python example for sha1 password hashes

Submitted By: Dave Hall <skwashd gmail.com>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1721976 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/misc/password_encryptions.xml
docs/manual/misc/password_encryptions.xml.fr

index 63df11a8dc638169b9f183d6052c16db40944bd2..e9acfe60a5393e988e9d446e6a201bca803822a9 100644 (file)
       Use the APR function: apr_sha1_base64
       </example>
 
+      <example><title>Python</title>
+      import base64<br />
+      import hashlib<br />
+      "{SHA}" + format(base64.b64encode(hashlib.sha1(password).digest()))
+      </example>
+
       <example>
         <title>PostgreSQL (with the contrib/pgcrypto functions
                installed)</title>
index 05e54086f558b6555abee39cecfa1a0aee089108..7667ecb0575864302cb4ce2f2e1d52f6d7340594 100644 (file)
       Utilisez la fonction APR : apr_sha1_base64
       </example>
 
+      <example><title>Python</title>
+      import base64<br />
+      import hashlib<br />
+      "{SHA}" + format(base64.b64encode(hashlib.sha1(password).digest()))
+      </example>
+
       <example>
         <title>PostgreSQL (avec les fonctions contrib/pgcrypto
                install&eacute;es)</title>