Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Unified Diff: packages/crypto/test/utils.dart

Issue 2990843002: Removed fixed dependencies (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « packages/crypto/test/hmac_sha256_test.dart ('k') | packages/csslib/CHANGELOG.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/crypto/test/utils.dart
diff --git a/packages/crypto/test/utils.dart b/packages/crypto/test/utils.dart
new file mode 100644
index 0000000000000000000000000000000000000000..1f58e9660345737909c2fbe17c4601632c902531
--- /dev/null
+++ b/packages/crypto/test/utils.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// 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';
+
+/// Asserts that an HMAC using [hash] returns [mac] for [input] and [key].
+void expectHmacEquals(Hash hash, List<int> input, List<int> key, String mac) {
+ var hmac = new Hmac(hash, key);
+ expect(hmac.convert(input).toString(), startsWith(mac));
+}
« no previous file with comments | « packages/crypto/test/hmac_sha256_test.dart ('k') | packages/csslib/CHANGELOG.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698