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

Unified Diff: tests/lib/crypto/hmac_md5_test.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « tests/lib/async/stream_single_test.dart ('k') | tests/lib/crypto/hmac_sha1_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/crypto/hmac_md5_test.dart
diff --git a/tests/lib/crypto/hmac_md5_test.dart b/tests/lib/crypto/hmac_md5_test.dart
index f47c7109191cb1fe84bc01d991df1bcd874e79ab..297314760be7d8192f0e7747066db27092c98d74 100644
--- a/tests/lib/crypto/hmac_md5_test.dart
+++ b/tests/lib/crypto/hmac_md5_test.dart
@@ -99,7 +99,8 @@ var hmac_md5_macs =
void testStandardVectors(inputs, keys, string_macs, macs) {
for (var i = 0; i < inputs.length; i++) {
var h = new HMAC(new MD5(), keys[i]);
- var d = h.update(inputs[i]).digest();
+ h.add(inputs[i]);
+ var d = h.close();
Expect.isTrue(CryptoUtils.bytesToHex(d).startsWith(string_macs[i]), '$i');
Expect.isTrue(h.verify(macs[i]));
Expect.isFalse(h.verify(macs[(i+1)%macs.length]));
« no previous file with comments | « tests/lib/async/stream_single_test.dart ('k') | tests/lib/crypto/hmac_sha1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698