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

Unified Diff: sdk/lib/crypto/hash_utils.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/core/map.dart ('k') | sdk/lib/crypto/hmac.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/crypto/hash_utils.dart
diff --git a/sdk/lib/crypto/hash_utils.dart b/sdk/lib/crypto/hash_utils.dart
index 8ceeb58174a6e07e9141be21e3b8b117e61fa743..d358b39801c494aefdca1a11160e13c7a121a433 100644
--- a/sdk/lib/crypto/hash_utils.dart
+++ b/sdk/lib/crypto/hash_utils.dart
@@ -24,8 +24,8 @@ abstract class _HashBase implements Hash {
int this._digestSizeInWords,
bool this._bigEndianWords)
: _pendingData = [] {
- _currentChunk = new List(_chunkSizeInWords);
- _h = new List(_digestSizeInWords);
+ _currentChunk = new List.fixedLength(_chunkSizeInWords);
+ _h = new List.fixedLength(_digestSizeInWords);
}
// Update the hasher with more data.
@@ -95,7 +95,7 @@ abstract class _HashBase implements Hash {
// Convert a 32-bit word to four bytes.
_wordToBytes(int word) {
- List<int> bytes = new List(_BYTES_PER_WORD);
+ List<int> bytes = new List.fixedLength(_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;
« no previous file with comments | « sdk/lib/core/map.dart ('k') | sdk/lib/crypto/hmac.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698