Merge pull request #41 from dart-lang/kevmoo_tweaks

Fix SDK constraint
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1417775..9538d91 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 2.0.2+1
+
+* Fix SDK constraint.
+
 ## 2.0.2
 
 * Prepare `HashSink` implementation for limiting integers to 64 bits in Dart
diff --git a/analysis_options.yaml b/analysis_options.yaml
index 092773b..2592ade 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -1,29 +1,30 @@
 analyzer:
- strong-mode: true
+  strong-mode: true
 linter:
   rules:
-     # Errors
-     - avoid_empty_else
-     - comment_references
-     - control_flow_in_finally
-     - empty_statements
-     - hash_and_equals
-     - test_types_in_equals
-     - throw_in_finally
-     - unrelated_type_equality_checks
-     - valid_regexps
+    # Errors
+    - avoid_empty_else
+    - comment_references
+    - control_flow_in_finally
+    - empty_statements
+    - hash_and_equals
+    - test_types_in_equals
+    - throw_in_finally
+    - unrelated_type_equality_checks
+    - valid_regexps
 
-     # Style
-     - annotate_overrides
-     - avoid_init_to_null
-     - avoid_return_types_on_setters
-     - await_only_futures
-     - camel_case_types
-     - empty_catches
-     - empty_constructor_bodies
-     - library_names
-     - library_prefixes
-     - non_constant_identifier_names
-     - prefer_is_not_empty
-     - slash_for_doc_comments
-     - type_init_formals
+    # Style
+    - annotate_overrides
+    - avoid_init_to_null
+    - avoid_return_types_on_setters
+    - await_only_futures
+    - camel_case_types
+    - empty_catches
+    - empty_constructor_bodies
+    - library_names
+    - library_prefixes
+    - non_constant_identifier_names
+    - prefer_is_not_empty
+    - prefer_single_quotes
+    - slash_for_doc_comments
+    - type_init_formals
diff --git a/lib/src/hash_sink.dart b/lib/src/hash_sink.dart
index 369d3e3..ef38780 100644
--- a/lib/src/hash_sink.dart
+++ b/lib/src/hash_sink.dart
@@ -127,7 +127,7 @@
 
     if (_lengthInBytes > _maxMessageLengthInBytes) {
       throw new UnsupportedError(
-          "Hashing is unsupported for messages with more than 2^64 bits.");
+          'Hashing is unsupported for messages with more than 2^64 bits.');
     }
 
     var lengthInBits = _lengthInBytes * bitsPerByte;
diff --git a/lib/src/hmac.dart b/lib/src/hmac.dart
index 5caed75..b043a56 100644
--- a/lib/src/hmac.dart
+++ b/lib/src/hmac.dart
@@ -85,13 +85,13 @@
 
   @override
   void add(List<int> data) {
-    if (_isClosed) throw new StateError("HMAC is closed");
+    if (_isClosed) throw new StateError('HMAC is closed');
     _innerSink.add(data);
   }
 
   @override
   void addSlice(List<int> data, int start, int end, bool isLast) {
-    if (_isClosed) throw new StateError("HMAC is closed");
+    if (_isClosed) throw new StateError('HMAC is closed');
     _innerSink.addSlice(data, start, end, isLast);
   }
 
diff --git a/lib/src/md5.dart b/lib/src/md5.dart
index f666ef1..2729c5c 100644
--- a/lib/src/md5.dart
+++ b/lib/src/md5.dart
@@ -89,8 +89,8 @@
     var c = digest[2];
     var d = digest[3];
 
-    var e;
-    var f;
+    int e;
+    int f;
 
     for (var i = 0; i < 64; i++) {
       if (i < 16) {
diff --git a/pubspec.yaml b/pubspec.yaml
index a0e1343..3cb1170 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,10 +1,10 @@
 name: crypto
-version: 2.0.2
+version: 2.0.2+1
 author: Dart Team <misc@dartlang.org>
 description: Library of cryptographic functions.
 homepage: https://www.github.com/dart-lang/crypto
 environment:
-  sdk: '>=1.16.0 <2.0.0-dev.infinity'
+  sdk: '>=1.16.0 <2.0.0'
 dependencies:
   collection: '^1.0.0'
   convert: '>=1.0.0 <3.0.0'
diff --git a/test/hmac_md5_test.dart b/test/hmac_md5_test.dart
index 68fa473..49e60f7 100644
--- a/test/hmac_md5_test.dart
+++ b/test/hmac_md5_test.dart
@@ -2,13 +2,13 @@
 // 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:test/test.dart";
+import 'package:crypto/crypto.dart';
+import 'package:test/test.dart';
 
 import 'utils.dart';
 
 void main() {
-  group("standard vector", () {
+  group('standard vector', () {
     for (var i = 0; i < _inputs.length; i++) {
       test(_macs[i], () {
         expectHmacEquals(md5, _inputs[i], _keys[i], _macs[i]);
diff --git a/test/hmac_sha1_test.dart b/test/hmac_sha1_test.dart
index 28eec21..c80b115 100644
--- a/test/hmac_sha1_test.dart
+++ b/test/hmac_sha1_test.dart
@@ -3,13 +3,13 @@
 // BSD-style license that can be found in the LICENSE file.
 
 // Library tag to allow the test to run on Dartium.
-import "package:crypto/crypto.dart";
-import "package:test/test.dart";
+import 'package:crypto/crypto.dart';
+import 'package:test/test.dart';
 
 import 'utils.dart';
 
 void main() {
-  group("standard vector", () {
+  group('standard vector', () {
     for (var i = 0; i < _inputs.length; i++) {
       test(_macs[i], () {
         expectHmacEquals(sha1, _inputs[i], _keys[i], _macs[i]);
diff --git a/test/hmac_sha256_test.dart b/test/hmac_sha256_test.dart
index 6c63268..a707813 100644
--- a/test/hmac_sha256_test.dart
+++ b/test/hmac_sha256_test.dart
@@ -3,13 +3,13 @@
 // BSD-style license that can be found in the LICENSE file.
 
 // Library tag to allow the test to run on Dartium.
-import "package:crypto/crypto.dart";
-import "package:test/test.dart";
+import 'package:crypto/crypto.dart';
+import 'package:test/test.dart';
 
 import 'utils.dart';
 
 void main() {
-  group("standard vector", () {
+  group('standard vector', () {
     for (var i = 0; i < _inputs.length; i++) {
       test(_macs[i], () {
         expectHmacEquals(sha256, _inputs[i], _keys[i], _macs[i]);
diff --git a/test/sha1_test.dart b/test/sha1_test.dart
index c0575e3..dffb400 100644
--- a/test/sha1_test.dart
+++ b/test/sha1_test.dart
@@ -2,14 +2,14 @@
 // 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 "dart:async";
-import "dart:convert";
+import 'dart:async';
+import 'dart:convert';
 
-import "package:crypto/crypto.dart";
-import "package:test/test.dart";
+import 'package:crypto/crypto.dart';
+import 'package:test/test.dart';
 
 void main() {
-  group("with a chunked converter", () {
+  group('with a chunked converter', () {
     test('add may not be called after close', () {
       var sink =
           sha1.startChunkedConversion(new StreamController<Digest>().sink);
@@ -31,7 +31,7 @@
           expectAsync1((accumulated) {
         expect(accumulated.length, equals(1));
         expect(accumulated.first.toString(),
-            equals("da39a3ee5e6b4b0d3255bfef95601890afd80709"));
+            equals('da39a3ee5e6b4b0d3255bfef95601890afd80709'));
       }));
 
       var outer = sha1.startChunkedConversion(inner);
@@ -39,7 +39,7 @@
     });
   });
 
-  group("standard vector", () {
+  group('standard vector', () {
     for (var i = 0; i < _inputs.length; i++) {
       test(_digests[i], () {
         expect(sha1.convert(_inputs[i]).toString(), equals(_digests[i]));
@@ -51,7 +51,7 @@
 // Standard test vectors from:
 //   http://csrc.nist.gov/groups/STM/cavp/documents/shs/shabytetestvectors.zip
 
-const _inputs = const [
+const _inputs = const <List<int>>[
   const [],
   const [0x36],
   const [0x19, 0x5a],
diff --git a/test/sha256_test.dart b/test/sha256_test.dart
index 50ae0b2..aa3f2b8 100644
--- a/test/sha256_test.dart
+++ b/test/sha256_test.dart
@@ -2,14 +2,14 @@
 // 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 "dart:async";
-import "dart:convert";
+import 'dart:async';
+import 'dart:convert';
 
-import "package:test/test.dart";
-import "package:crypto/crypto.dart";
+import 'package:test/test.dart';
+import 'package:crypto/crypto.dart';
 
 void main() {
-  group("with a chunked converter", () {
+  group('with a chunked converter', () {
     test('add may not be called after close', () {
       var sink =
           sha256.startChunkedConversion(new StreamController<Digest>().sink);
@@ -33,8 +33,8 @@
         expect(
             accumulated.first.toString(),
             equals(
-                "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b8"
-                "55"));
+                'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b8'
+                '55'));
       }));
 
       var outer = sha256.startChunkedConversion(inner);
@@ -42,7 +42,7 @@
     });
   });
 
-  group("standard vector", () {
+  group('standard vector', () {
     for (var i = 0; i < _inputs.length; i++) {
       test(_digests[i], () {
         expect(sha256.convert(_inputs[i]).toString(), equals(_digests[i]));
@@ -54,7 +54,7 @@
 // Standard test vectors from:
 //   http://csrc.nist.gov/groups/STM/cavp/documents/shs/shabytetestvectors.zip
 
-const _inputs = const [
+const _inputs = const <List<int>>[
   const [],
   const [0xd3],
   const [0x11, 0xaf],