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

Unified Diff: sdk/lib/crypto/hmac.dart

Issue 11312122: Change List constructors. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Reupload. Adapt code for List.fixedLength. Created 8 years 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 | « sdk/lib/crypto/hash_utils.dart ('k') | sdk/lib/crypto/sha1.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/crypto/hmac.dart
diff --git a/sdk/lib/crypto/hmac.dart b/sdk/lib/crypto/hmac.dart
index 6d0d502cb1221fb4ad70cb0be58bac6bfe623aca..4a48d76ff8362ae6f33525e146b2c7a3a46b3af2 100644
--- a/sdk/lib/crypto/hmac.dart
+++ b/sdk/lib/crypto/hmac.dart
@@ -21,7 +21,7 @@ class _HMAC implements HMAC {
// Zero-pad the key until its size is equal to the block size of the hash.
if (_key.length < blockSize) {
- var newKey = new List(blockSize);
+ var newKey = new List.fixedLength(blockSize);
newKey.setRange(0, _key.length, _key);
for (var i = _key.length; i < blockSize; i++) {
newKey[i] = 0;
@@ -30,7 +30,7 @@ class _HMAC implements HMAC {
}
// Compute inner padding.
- var padding = new List(blockSize);
+ var padding = new List.fixedLength(blockSize);
for (var i = 0; i < blockSize; i++) {
padding[i] = 0x36 ^ _key[i];
}
« no previous file with comments | « sdk/lib/crypto/hash_utils.dart ('k') | sdk/lib/crypto/sha1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698