parameters: (self, entity_body='')
return_statement: return H(a2)
docstring: Returns the H(A2) string. See :rfc:`2617` section 3.2.2.3.
docstring_summary: Returns the H(A2) string. See :rfc:`2617` section 3.2.2.3.
docstring_tokens: Returns the H ( A2 ) string . See : rfc : 2617 section 3 . 2 . 2 . 3 .
function: def HA2(self, entity_body=''):
          """Returns the H(A2) string. See :rfc:`2617` section 3.2.2.3."""
          # RFC 2617 3.2.2.3
          # If the "qop" directive's value is "auth" or is unspecified, then A2 is:
          #    A2 = method ":" digest-uri-value
          #
          # If the "qop" value is "auth-int", then A2 is:
          #    A2 = method ":" digest-uri-value ":" H(entity-body)
          if self.qop is None or self.qop == "auth":
              a2 = '%s:%s' % (self.http_method, self.uri)
          elif self.qop == "auth-int":
              a2 = "%s:%s:%s" % (self.http_method, self.uri, H(entity_body))
          else:
              # in theory, this should never happen, since I validate qop in __init__()
              raise ValueError(self.errmsg("Unrecognized value for qop!"))
          return H(a2)
function_tokens: def HA2 ( self , entity_body = '' ) : # RFC 2617 3.2.2.3 # If the "qop" directive's value is "auth" or is unspecified, then A2 is: #    A2 = method ":" digest-uri-value # # If the "qop" value is "auth-int", then A2 is: #    A2 = method ":" digest-uri-value ":" H(entity-body) if self . qop is None or self . qop == "auth" : a2 = '%s:%s' % ( self . http_method , self . uri ) elif self . qop == "auth-int" : a2 = "%s:%s:%s" % ( self . http_method , self . uri , H ( entity_body ) ) else : # in theory, this should never happen, since I validate qop in __init__() raise ValueError ( self . errmsg ( "Unrecognized value for qop!" ) ) return H ( a2 )