private function getHA2(): ?string
    {
        $method = $this->getMethod();
        $uri = $this->getUri();

        if (($method) && ($uri)) {
            $qop = $this->getQOP();

            if (null === $qop || 'auth' === $qop) {
                $A2 = "{$method}:{$uri}";
            } elseif ('auth-int' === $qop) {
                $entityBody = (string) $this->getEntityBody();
                $A2 = "{$method}:{$uri}:".(string) $this->hash($entityBody);
            } else {
                return null;
            }

            $HA2 = $this->hash($A2);

            return $HA2;
        }

        return null;
    }
private function getHA2(): ?string
    {
        $method = $this->getMethod();
        $uri = $this->getUri();

        if (($method) && ($uri)) {
            $qop = $this->getQOP();

            if (null === $qop || 'auth' === $qop) {
                $A2 = "{$method}:{$uri}";
            } elseif ('auth-int' === $qop) {
                $entityBody = (string) $this->getEntityBody();
                $A2 = "{$method}:{$uri}:".(string) $this->hash($entityBody);
            } else {
                return null;
            }

            $HA2 = $this->hash($A2);

            return $HA2;
        }

        return null;
    }
private function getHA2 ( ) : ? string { $ method = $ this -> getMethod ( ) ; $ uri = $ this -> getUri ( ) ; if ( ( $ method ) && ( $ uri ) ) { $ qop = $ this -> getQOP ( ) ; if ( null === $ qop || 'auth' === $ qop ) { $ A2 = "{$method}:{$uri}" ; } elseif ( 'auth-int' === $ qop ) { $ entityBody = ( string ) $ this -> getEntityBody ( ) ; $ A2 = "{$method}:{$uri}:" . ( string ) $ this -> hash ( $ entityBody ) ; } else { return null ; } $ HA2 = $ this -> hash ( $ A2 ) ; return $ HA2 ; } return null ; }
Calculates the value of HA2 according to RFC 2617 and RFC 2069.

@return string The value of HA2
Calculates the value of HA2 according to RFC 2617 and RFC 2069 .