From: Eric Covener Date: Mon, 28 Dec 2015 18:27:00 +0000 (+0000) Subject: PR58764: python example for sha1 password hashes X-Git-Tag: 2.5.0-alpha~2493 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3d902c46139f148bdfb6f61a1a6925d515576085;p=apache PR58764: python example for sha1 password hashes Submitted By: Dave Hall git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1721975 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/misc/password_encryptions.xml b/docs/manual/misc/password_encryptions.xml index 63df11a8dc..e9acfe60a5 100644 --- a/docs/manual/misc/password_encryptions.xml +++ b/docs/manual/misc/password_encryptions.xml @@ -161,6 +161,12 @@ Use the APR function: apr_sha1_base64 + Python + import base64
+ import hashlib
+ "{SHA}" + format(base64.b64encode(hashlib.sha1(password).digest())) +
+ PostgreSQL (with the contrib/pgcrypto functions installed) diff --git a/docs/manual/misc/password_encryptions.xml.fr b/docs/manual/misc/password_encryptions.xml.fr index a581175bed..743dd69530 100644 --- a/docs/manual/misc/password_encryptions.xml.fr +++ b/docs/manual/misc/password_encryptions.xml.fr @@ -175,6 +175,12 @@ Utilisez la fonction APR : apr_sha1_base64 + Python + import base64
+ import hashlib
+ "{SHA}" + format(base64.b64encode(hashlib.sha1(password).digest())) +
+ PostgreSQL (avec les fonctions contrib/pgcrypto installées)