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

Unified Diff: test/utils.dart

Issue 1356403003: Make HMAC a Converter. (Closed) Base URL: git@github.com:dart-lang/crypto.git@master
Patch Set: Created 5 years, 3 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 | « lib/src/hmac.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/utils.dart
diff --git a/test/utils.dart b/test/utils.dart
index d65f0ebd21fb66a6c65c4671fa2250d2758c50a0..82b9f8a5f4bcb1b23c0c17c2a036173ab71b7445 100644
--- a/test/utils.dart
+++ b/test/utils.dart
@@ -11,6 +11,5 @@ 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);
- hmac.add(input);
- expect(CryptoUtils.bytesToHex(hmac.close()), startsWith(mac));
+ expect(hmac.convert(input).toString(), startsWith(mac));
}
« no previous file with comments | « lib/src/hmac.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698