def _hmac_etag(key, etag):
 result = hmac.new(key, etag, digestmod=hashlib.sha256).digest()
 return base64.b64encode(result).decode()

def _hmac_etag ( key , etag ) : result = hmac . new ( key , etag , digestmod = hashlib . sha256 ) . digest ( ) return base64 . b64encode ( result ) . decode ( )
compute an hmac-sha256 using given key and etag .