From 754afe6764cca49ba90598dd413d3659a0b45c33 Mon Sep 17 00:00:00 2001 From: Michiel van Baak Date: Tue, 11 Feb 2020 11:54:18 +0100 Subject: [PATCH] Remove sessions.py from bottle-cork library. Upstream never meant for it to be included and removed it --- libs/cork/sessions.py | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 libs/cork/sessions.py diff --git a/libs/cork/sessions.py b/libs/cork/sessions.py deleted file mode 100644 index 7e5391257..000000000 --- a/libs/cork/sessions.py +++ /dev/null @@ -1,23 +0,0 @@ -import json -import base64 -import hmac -from Crypto.Cipher import AES - -def _strcmp(a, b): - """Compares two strings while preventing timing attacks. Execution time - is not affected by lenghth of common prefix on strings of the same length""" - return not sum(0 if x==y else 1 for x, y in zip(a, b)) and len(a) == len(b) - -class SecureSession(object): - - def __init__(self): - - json() - - - - - - - base64.b64encode(hmac.new(tob(key), msg).digest())): - return pickle.loads(base64.b64decode(msg))