By default, I think password fields only get an IS_LENGTH validator, so you'll have to set the CRYPT validator explicitly.
Anthony On Tuesday, March 18, 2014 1:04:54 PM UTC-4, Encompass solutions wrote: > I am trying to create a model with an encrypted key so it's harder for > someone to maliciously screw over my customers. > I have the following snippet. > Field('public_gram', 'boolean', default=False), > Field('tag_name', 'list:string'), > Field('deletion_key', 'password') > ) > You can see there the "deletion_key" is a feild type "password" which I > understand is hashed out so you can't get the original code. However, when > I try to print it I get this... > test > CRYPT()(gram_details.deletion_key) > (<gluon.validators.LazyCrypt object at 0x7f56b8305c10>, None) > CRYPT()(gram_details.deletion_key) == gram_details.deletion_key > False > Where "test" is print gram_details.deletion_key > If this is the case then my password is not very cryptic. > Am I doing something wrong? > BR, > Jason Brower > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.