def response_value(nonce, nc, cnonce, qop, a2_prefix='AUTHENTICATE')
      a1_h = h("#{preferences.username}:#{preferences.realm}:#{preferences.password}")
      a1 = "#{a1_h}:#{nonce}:#{cnonce}"
      if preferences.authzid
        a1 += ":#{preferences.authzid}"
      end
      if qop && (qop.downcase == 'auth-int' || qop.downcase == 'auth-conf')
        a2 = "#{a2_prefix}:#{preferences.digest_uri}:00000000000000000000000000000000"
      else
        a2 = "#{a2_prefix}:#{preferences.digest_uri}"
      end
      hh("#{hh(a1)}:#{nonce}:#{nc}:#{cnonce}:#{qop}:#{hh(a2)}")
    end
def response_value(nonce, nc, cnonce, qop, a2_prefix='AUTHENTICATE')
      a1_h = h("#{preferences.username}:#{preferences.realm}:#{preferences.password}")
      a1 = "#{a1_h}:#{nonce}:#{cnonce}"
      if preferences.authzid
        a1 += ":#{preferences.authzid}"
      end
      if qop && (qop.downcase == 'auth-int' || qop.downcase == 'auth-conf')
        a2 = "#{a2_prefix}:#{preferences.digest_uri}:00000000000000000000000000000000"
      else
        a2 = "#{a2_prefix}:#{preferences.digest_uri}"
      end
      hh("#{hh(a1)}:#{nonce}:#{nc}:#{cnonce}:#{qop}:#{hh(a2)}")
    end
Calculate the value for the response field