| Index: pkg/crypto/lib/src/hash_utils.dart
|
| ===================================================================
|
| --- pkg/crypto/lib/src/hash_utils.dart (revision 43158)
|
| +++ pkg/crypto/lib/src/hash_utils.dart (working copy)
|
| @@ -25,8 +25,8 @@
|
| final int _chunkSizeInWords;
|
| final int _digestSizeInWords;
|
| final bool _bigEndianWords;
|
| - final List<int> _currentChunk;
|
| - final List<int> _h;
|
| + final Uint32List _currentChunk;
|
| + final Uint32List _h;
|
| int _lengthInBytes = 0;
|
| List<int> _pendingData;
|
| bool _digestCalled = false;
|
| @@ -35,8 +35,8 @@
|
| int digestSizeInWords,
|
| bool this._bigEndianWords)
|
| : _pendingData = [],
|
| - _currentChunk = new List(chunkSizeInWords),
|
| - _h = new List(digestSizeInWords),
|
| + _currentChunk = new Uint32List(chunkSizeInWords),
|
| + _h = new Uint32List(digestSizeInWords),
|
| _chunkSizeInWords = chunkSizeInWords,
|
| _digestSizeInWords = digestSizeInWords;
|
|
|
| @@ -69,7 +69,7 @@
|
| }
|
|
|
| // One round of the hash computation.
|
| - void _updateHash(List<int> m);
|
| + void _updateHash(Uint32List m);
|
|
|
| // Helper methods.
|
| int _add32(x, y) => (x + y) & _MASK_32;
|
| @@ -103,8 +103,8 @@
|
| }
|
|
|
| // Convert a 32-bit word to four bytes.
|
| - List<int> _wordToBytes(int word) {
|
| - List<int> bytes = new List(_BYTES_PER_WORD);
|
| + Uint32List _wordToBytes(int word) {
|
| + Uint32List bytes = new Uint32List(_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;
|
|
|