Commit 6c1cda8a authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Arnaud Fontaine

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

parent 42c1b4a2
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