| Index: tests/standalone/io/web_socket_compression_test.dart
|
| diff --git a/tests/standalone/io/web_socket_compression_test.dart b/tests/standalone/io/web_socket_compression_test.dart
|
| index e25bc1b2d4f6a28fc926e14a7d163a4793eea154..99f341eeaf6939a821a11ebb5b36528938a45864 100644
|
| --- a/tests/standalone/io/web_socket_compression_test.dart
|
| +++ b/tests/standalone/io/web_socket_compression_test.dart
|
| @@ -57,7 +57,7 @@ class SecurityConfiguration {
|
| for (int i = 0; i < 16; i++) {
|
| nonceData[i] = random.nextInt(256);
|
| }
|
| - String nonce = CryptoUtils.bytesToBase64(nonceData);
|
| + String nonce = BASE64.encode(nonceData);
|
|
|
| uri = new Uri(
|
| scheme: uri.scheme == "wss" ? "https" : "http",
|
| @@ -71,7 +71,7 @@ class SecurityConfiguration {
|
| if (uri.userInfo != null && !uri.userInfo.isEmpty) {
|
| // If the URL contains user information use that for basic
|
| // authorization.
|
| - String auth = CryptoUtils.bytesToBase64(UTF8.encode(uri.userInfo));
|
| + String auth = BASE64.encode(UTF8.encode(uri.userInfo));
|
| request.headers.set(HttpHeaders.AUTHORIZATION, "Basic $auth");
|
| }
|
| // Setup the initial handshake.
|
| @@ -175,8 +175,8 @@ class SecurityConfiguration {
|
| Expect.equals('websocket', request.headers.value(HttpHeaders.UPGRADE));
|
|
|
| var key = request.headers.value('Sec-WebSocket-Key');
|
| - var sha1 = new SHA1()..add("$key$WEB_SOCKET_GUID".codeUnits);
|
| - var accept = CryptoUtils.bytesToBase64(sha1.close());
|
| + var digest = sha1.convert("$key$WEB_SOCKET_GUID".codeUnits);
|
| + var accept = BASE64.encode(digest.bytes);
|
| request.response
|
| ..statusCode = HttpStatus.SWITCHING_PROTOCOLS
|
| ..headers.add(HttpHeaders.CONNECTION, "Upgrade")
|
|
|