From 16ff6cef08cc2cb88a1387efa1adb8c773efcac2 Mon Sep 17 00:00:00 2001 From: Massimo Di Pierro Date: Thu, 17 May 2012 15:56:19 -0500 Subject: [PATCH] get or create key now defaults to sha512 asn should have all along, thanks Harkirat --- VERSION | 2 +- gluon/tools.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 98aed456..75b1b7cd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-05-17 10:53:49) dev +Version 2.00.0 (2012-05-17 15:55:39) dev diff --git a/gluon/tools.py b/gluon/tools.py index 6cd652bd..153300a1 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -861,14 +861,14 @@ class Auth(object): """ @staticmethod - def get_or_create_key(filename=None): + def get_or_create_key(filename=None, alg='sha512'): request = current.request if not filename: filename = os.path.join(request.folder,'private','auth.key') if os.path.exists(filename): key = open(filename,'r').read().strip() else: - key = web2py_uuid() + key = alg+web2py_uuid() open(filename,'w').write(key) return key