[web2py] Re: simple_hash and salt order

2016-05-27 Thread Anthony
On Friday, May 27, 2016 at 6:47:32 AM UTC-4, David Orme wrote: > > Hi Anthony, > > Many thanks. Just to check - option 1 would have to be done in the web2py > codebase (i.e. outside of the application code)? I don't think there's any > simple way of overriding the version of simple_hash imported

[web2py] Re: simple_hash and salt order

2016-05-27 Thread David Orme
Hi Anthony, Many thanks. Just to check - option 1 would have to be done in the web2py codebase (i.e. outside of the application code)? I don't think there's any simple way of overriding the version of simple_hash imported from gluon.utils that LazyCrypt() calls. Both the other options can be

[web2py] Re: simple_hash and salt order

2016-05-26 Thread Anthony
Aside from forking the framework, I suppose you could take one of these approaches: 1. Monkey patch gluon.utils.simple_hash. 2. Subclass validators.CRYPT and validators.LazyCrypt, and in LazyCrypt, replace the __str__ method with one that calls a custom simple_hash function. 3.