diff --git a/gluon/utils.py b/gluon/utils.py index e18edb8d..4df0cbc3 100644 --- a/gluon/utils.py +++ b/gluon/utils.py @@ -66,6 +66,7 @@ else: logger = logging.getLogger("web2py") + def AES_new(key, IV=None): """ Returns an AES cipher object and random IV if None specified """ if IV is None: @@ -88,6 +89,7 @@ def md5_hash(text): """ Generates a md5 hash with the given text """ return md5(text).hexdigest() + def simple_hash(text, key='', salt='', digest_alg='md5'): """ Generates hash with the given text using the specified