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

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

Issue 12328104: Change new List(n) to return fixed length list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head. Created 7 years, 10 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
Index: sdk/lib/crypto/hmac.dart
diff --git a/sdk/lib/crypto/hmac.dart b/sdk/lib/crypto/hmac.dart
index 2dd3902c27e96865a91ff4a6620a924b3d97b457..794746d299747d1cbd7e32bb52fe617956c8d308 100644
--- a/sdk/lib/crypto/hmac.dart
+++ b/sdk/lib/crypto/hmac.dart
@@ -26,7 +26,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.fixedLength(blockSize);
+ var newKey = new List(blockSize);
newKey.setRange(0, _key.length, _key);
for (var i = _key.length; i < blockSize; i++) {
newKey[i] = 0;
@@ -35,7 +35,7 @@ class _HMAC implements HMAC {
}
// Compute inner padding.
- var padding = new List.fixedLength(blockSize);
+ var padding = new List(blockSize);
for (var i = 0; i < blockSize; i++) {
padding[i] = 0x36 ^ _key[i];
}

Powered by Google App Engine
This is Rietveld 408576698