| Index: lib/src/channel.dart
|
| diff --git a/lib/src/channel.dart b/lib/src/channel.dart
|
| index 446eb694a7903d284bf6b507d34505cc0d920dd6..3d1d4929994abe6c91c558b4405d7a34a66a5aa4 100644
|
| --- a/lib/src/channel.dart
|
| +++ b/lib/src/channel.dart
|
| @@ -62,11 +62,9 @@ class WebSocketChannel extends StreamChannelMixin {
|
| ///
|
| /// [initial handshake]: https://tools.ietf.org/html/rfc6455#section-4.2.2
|
| static String signKey(String key) {
|
| - var hash = new SHA1();
|
| // We use [codeUnits] here rather than UTF-8-decoding the string because
|
| // [key] is expected to be base64 encoded, and so will be pure ASCII.
|
| - hash.add((key + webSocketGUID).codeUnits);
|
| - return CryptoUtils.bytesToBase64(hash.close());
|
| + return BASE64.encode(sha1.convert((key + webSocketGUID).codeUnits).bytes);
|
| }
|
|
|
| /// Creates a new WebSocket handling messaging across an existing [channel].
|
|
|