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

Unified Diff: tests/lib/crypto/hmac_sha1_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/crypto/hmac_md5_test.dart ('k') | tests/lib/crypto/hmac_sha256_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/crypto/hmac_sha1_test.dart
diff --git a/tests/lib/crypto/hmac_sha1_test.dart b/tests/lib/crypto/hmac_sha1_test.dart
index 1aec85d0199141b50582087d6df3ffbc0d2451bc..8a87ceb2c982f852449ca4e6f7d537592cf20fc5 100644
--- a/tests/lib/crypto/hmac_sha1_test.dart
+++ b/tests/lib/crypto/hmac_sha1_test.dart
@@ -11,7 +11,9 @@ part 'hmac_sha1_test_vectors.dart';
void testStandardVectors(inputs, keys, macs) {
for (var i = 0; i < inputs.length; i++) {
- var d = new HMAC(new SHA1(), keys[i]).update(inputs[i]).digest();
+ var hmac = new HMAC(new SHA1(), keys[i]);
+ hmac.add(inputs[i]);
+ var d = hmac.close();
Expect.isTrue(CryptoUtils.bytesToHex(d).startsWith(macs[i]), '$i');
}
}
« no previous file with comments | « tests/lib/crypto/hmac_md5_test.dart ('k') | tests/lib/crypto/hmac_sha256_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698