Commit 3867f3c5 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Jérome Perrin

py2/py3: hmac.new() requires digestmod argument from Python 3.8.

parent 5e37ed82
import hashlib
import hmac
from Products.ERP5Type.Cache import DEFAULT_CACHE_SCOPE
CACHE_FACTORY_NAME = 'bearer_token_cache_factory'
def getHMAC(self, key, body):
digest = hmac.new(key, body)
digest = hmac.new(key, body, digestmod=hashlib.md5)
return digest.hexdigest()
def _getCacheFactory(self, cache_factory_name):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment