
hmac.compare_digest() method in python 3 doesn't suppport non-ASCII characters, so that we need to use HMAC.hexdigest() to avoid non-ASCII bytes. For backward compability, we still need to support HMAC created by using HMAC.digest() in the old amphorae. Change-Id: I1061e855d0ce06d91a26d217291008197e4a708b Depends-On: https://review.openstack.org/#/c/567688/ Story: 2002125 Task: 19807