1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-25 09:12:38 +00:00

Remove sessions.py from bottle-cork library. Upstream never meant for it to be included and removed it

This commit is contained in:
Michiel van Baak 2020-02-11 11:54:18 +01:00
parent e13a2db994
commit 754afe6764

View file

@ -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))