From 11b5d7d9d007ae41d3f70432497f702eccf790ec Mon Sep 17 00:00:00 2001 From: mdipierro Date: Wed, 18 Jul 2012 18:32:46 -0500 Subject: [PATCH] added a comment about md5, thanks Osman --- VERSION | 2 +- gluon/validators.py | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 871f2563..ce038a12 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-07-18 18:24:53) dev +Version 2.00.0 (2012-07-18 18:32:43) dev diff --git a/gluon/validators.py b/gluon/validators.py index ff28b5f4..38ff828c 100644 --- a/gluon/validators.py +++ b/gluon/validators.py @@ -2628,7 +2628,15 @@ class CRYPT(object): """ - def __init__(self, key=None, digest_alg='md5', min_length=0, error_message='too short', salt=None): + def __init__(self, key=None, digest_alg='md5', min_length=0, + error_message='too short', salt=None): + """ + important, digest_alg='md5' is not the default hashing algorithm for + web2py. This is only an example of usage of this function. + + The actual hash algorithm is determined from the key which is + generated by web2py in tools.py. This defaults to hmac+sha512. + """ self.key = key self.digest_alg = digest_alg self.min_length = min_length