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'); |
} |
} |