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

Unified Diff: sdk/lib/crypto/hash_utils.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/hash_utils.dart
diff --git a/sdk/lib/crypto/hash_utils.dart b/sdk/lib/crypto/hash_utils.dart
index ed42140f385cbe5ba343da63d46364ebf6d375b8..d0b13cf43f161c992584610c047418119deeac70 100644
--- a/sdk/lib/crypto/hash_utils.dart
+++ b/sdk/lib/crypto/hash_utils.dart
@@ -26,8 +26,8 @@ abstract class _HashBase implements Hash {
int this._digestSizeInWords,
bool this._bigEndianWords)
: _pendingData = [] {
- _currentChunk = new List.fixedLength(_chunkSizeInWords);
- _h = new List.fixedLength(_digestSizeInWords);
+ _currentChunk = new List(_chunkSizeInWords);
+ _h = new List(_digestSizeInWords);
}
// Update the hasher with more data.
@@ -97,7 +97,7 @@ abstract class _HashBase implements Hash {
// Convert a 32-bit word to four bytes.
_wordToBytes(int word) {
- List<int> bytes = new List.fixedLength(_BYTES_PER_WORD);
+ List<int> bytes = new List(_BYTES_PER_WORD);
bytes[0] = (word >> (_bigEndianWords ? 24 : 0)) & _MASK_8;
bytes[1] = (word >> (_bigEndianWords ? 16 : 8)) & _MASK_8;
bytes[2] = (word >> (_bigEndianWords ? 8 : 16)) & _MASK_8;

Powered by Google App Engine
This is Rietveld 408576698