anchor.diff:  // for details. All rights reserved. Use of this source code is governed by a
   // BSD-style license that can be found in the LICENSE file.
   
  +import "package:convert/convert.dart";
   import "package:crypto/crypto.dart";
   import "package:expect/expect.dart";
  -import "package:path/path.dart";
   import "dart:async";
   import "dart:io";
   import 'dart:convert';
  
positive.code:     this.username = username;
      this.password = password;
      authScheme = "Basic";
    }
  
    void useDigestAuthentication(String username, String password) {
      this.username = username;
      this.password = password;
      authScheme = "Digest";
  
      // Calculate ha1.
      var hasher = new MD5();
      hasher.add("${username}:${realm}:${password}".codeUnits);
      ha1 = CryptoUtils.bytesToHex(hasher.close());
    }
  
    basicAuthenticationRequired(request) {
  
negative.code:               }
                Expect.isNotNull(header.parameters["response"]);
  
                var digest = md5.convert("${request.method}:${uri}".codeUnits);
                var ha2 = hex.encode(digest.bytes);
  
                if (qop == null || qop == "" || qop == "none") {
                  digest = md5.convert("$ha1:${nonce}:$ha2".codeUnits);
                } else {
                  digest = md5.convert(
                      "$ha1:${nonce}:${nc}:${cnonce}:${qop}:$ha2".codeUnits);
                }
                Expect.equals(hex.encode(digest.bytes),
                    header.parameters["response"]);
  
                // Add a bogus Proxy-Authentication-Info for testing.
                var info = 'rspauth="77180d1ab3d6c9de084766977790f482", '
  