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

# Class CRYPT

source code

    object --+
             |
            CRYPT

example:

       INPUT(_type='text', _name='name', requires=CRYPT())

encodes the value on validation with a digest.

If no arguments are provided CRYPT uses the MD5 algorithm. If the key argument is provided the HMAC+MD5 algorithm is used. If the digest_alg is specified this is used to replace the MD5 with, for example, SHA512. The digest_alg can be the name of a hashlib algorithm as a string or the algorithm itself.

Instance Methods | [hide private]
__init__(self, key=1, digest_alg=`'``md5``'`) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code
__call__(self, value) | source code
Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, key=1, digest_alg=`'``md5``'`) (Constructor) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: object.__init__ (inherited documentation)