I just gave a 12 seconds glance on it and found something that can be
updated:

On page 201:

CRYPT This is also a filter. It performs a secure hash on the input and
it is
used to prevent passwords from being passed in the clear to the
database.
1 requires=CRYPT(key=None)
If the key is None, it uses the MD5 algorithm. If a key is specified it
uses
the HMAC+SHA512 with the provided key. The key has to be a unique
string
associated to the database used. The key can never be changed. If you
lose
the key the previously hashed values become useless.

but you can also do...
SQLField('password','password',requires=CRYPT(digest_alg='sha512'))
Now, the CRYPT validator supports all hashing algorithms
supported by python's hashlib library just by defining that parameter
in the example CRYPT(digest_alt='<name_of_the_digest_alg>')

" Included are the FIPS secure hash algorithms SHA1, SHA224, SHA256,
SHA384, and SHA512 (defined in FIPS 180-2) as well as RSA’s MD5
algorithm (defined in Internet RFC 1321) "

since you seem to be revising your book (which I impatiently await)
remember the
orderby=<random> option on .select() queries unless if it is already
included on the 1st edition. If yes, sorry (i don't have a copy to
validate this).

Best Regards


On Jul 11, 3:57 pm, Massimo Di Pierro <[email protected]> wrote:
> Chapters 7 and 8 have been revised including corrections from Mr  
> Admin, Fran and Jonathan.
>
>  web2py_manual_678.pdf
> 1982KViewDownload
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to