Chromium Code Reviews| Index: lib/crypto/sha_utils.dart |
| diff --git a/lib/crypto/sha_utils.dart b/lib/crypto/sha_utils.dart |
| index 42aebae7d082ec00d08a94709c0e66184d488a15..ebc19b96c1f508d4e07bd8916243eca30457407a 100644 |
| --- a/lib/crypto/sha_utils.dart |
| +++ b/lib/crypto/sha_utils.dart |
| @@ -10,7 +10,7 @@ final _BYTES_PER_WORD = 4; |
| // Base class encapsulating common behavior for SHA cryptographic hash |
| // functions. |
| -class _SHACryptoHashBase implements CryptoHash { |
| +class _SHACryptoHashBase { |
|
Ben Laurie (Google)
2012/04/27 13:26:33
Why no longer implements CryptoHash?
Mads Ager (google)
2012/04/30 07:56:57
Because it doesn't. It does not have the newInstan
|
| _SHACryptoHashBase(int this._chunkSizeInWords, int this._digestSizeInWords) |
| : _pendingData = [] { |
| _currentChunk = new List(_chunkSizeInWords); |
| @@ -46,6 +46,11 @@ class _SHACryptoHashBase implements CryptoHash { |
| return result; |
| } |
| + // Returns the block size of the hash in bytes. |
| + int get blockSize() { |
| + return _chunkSizeInWords * _BYTES_PER_WORD; |
| + } |
| + |
| // One round of the hash computation. |
| abstract _updateHash(List<int> m); |
| @@ -108,9 +113,9 @@ class _SHACryptoHashBase implements CryptoHash { |
| } |
| // Hasher state. |
| + final int _chunkSizeInWords; |
| + final int _digestSizeInWords; |
| int _lengthInBytes = 0; |
| - int _chunkSizeInWords; |
| - int _digestSizeInWords; |
| List<int> _pendingData; |
| List<int> _currentChunk; |
| List<int> _h; |