anchor.diff:                }
                 Expect.isNotNull(header.parameters["response"]);
   
  -              var hasher = new MD5();
  -              hasher.add("${request.method}:${uri}".codeUnits);
  -              var ha2 = CryptoUtils.bytesToHex(hasher.close());
  -
  -              var x;
  -              hasher = new MD5();
  +              var digest = md5.convert("${request.method}:${uri}".codeUnits);
  +              var ha2 = hex.encode(digest.bytes);
  +
                 if (qop == null || qop == "" || qop == "none") {
  -                hasher.add("$ha1:${nonce}:$ha2".codeUnits);
  +                digest = md5.convert("$ha1:${nonce}:$ha2".codeUnits);
                 } else {
  -                hasher.add(
  +                digest = md5.convert(
                       "$ha1:${nonce}:${nc}:${cnonce}:${qop}:$ha2".codeUnits);
                 }
  -              Expect.equals(CryptoUtils.bytesToHex(hasher.close()),
  -                            header.parameters["response"]);
  +              Expect.equals(hex.encode(digest.bytes),
  +                  header.parameters["response"]);
   
                 // Add a bogus Proxy-Authentication-Info for testing.
                 var info = 'rspauth="77180d1ab3d6c9de084766977790f482", '
  
positive.code: // 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:crypto/crypto.dart";
  import "package:expect/expect.dart";
  import "package:path/path.dart";
  import "dart:async";
  import "dart:io";
  import 'dart:convert';
  
negative.code:     this.username = username;
      this.password = password;
      authScheme = "Basic";
    }
  
    basicAuthenticationRequired(request) {
  