Package gluon :: Module validators :: Class LazyCrypt
[hide private]
[frames] | no frames]

Class LazyCrypt

source code

object --+
         |
        LazyCrypt

Stores a lazy password hash

Instance Methods [hide private]
 
__init__(self, crypt, password)
crypt is an instance of the CRYPT validator, password is the password as inserted by the user
source code
 
__str__(self)
Encrypted self.password and caches it in self.crypted.
source code
 
__eq__(self, stored_password)
compares the current lazy crypted password with a stored password
source code
 
__ne__(self, other) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, crypt, password)
(Constructor)

source code 

crypt is an instance of the CRYPT validator, password is the password as inserted by the user

Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

Encrypted self.password and caches it in self.crypted. If self.crypt.salt the output is in the format <algorithm>$<salt>$<hash>

Try get the digest_alg from the key (if it exists) else assume the default digest_alg. If not key at all, set key=''

If a salt is specified use it, if salt is True, set salt to uuid (this should all be backward compatible)

Options: key = 'uuid' key = 'md5:uuid' key = 'sha512:uuid' ... key = 'pbkdf2(1000,64,sha512):uuid' 1000 iterations and 64 chars length

Overrides: object.__str__