Commit d1f98421 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

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

parent a36d7453
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