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

Unified Diff: tests/lib/crypto/hmac_sha256_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_sha1_test.dart ('k') | tests/lib/crypto/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_sha256_test.dart
diff --git a/tests/lib/crypto/hmac_sha256_test.dart b/tests/lib/crypto/hmac_sha256_test.dart
index 8b2deb5670ce0a6a3b0e6ec09f1dd429367ac590..bfd85b2bbdac34d24743102524134ce44d44eee0 100644
--- a/tests/lib/crypto/hmac_sha256_test.dart
+++ b/tests/lib/crypto/hmac_sha256_test.dart
@@ -11,7 +11,9 @@ part 'hmac_sha256_test_vectors.dart';
void testStandardVectors(inputs, keys, macs) {
for (var i = 0; i < inputs.length; i++) {
- var d = new HMAC(new SHA256(), keys[i]).update(inputs[i]).digest();
+ var hmac = new HMAC(new SHA256(), 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_sha1_test.dart ('k') | tests/lib/crypto/sha1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698