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: pkg/crypto/lib/src/hash_utils.dart

Issue 169363008: pkg/crypto: move tests to unittest package (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: feedback Created 6 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
« no previous file with comments | « pkg/crypto/lib/src/crypto_utils.dart ('k') | pkg/crypto/lib/src/hmac.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/crypto/lib/src/hash_utils.dart
diff --git a/pkg/crypto/lib/src/hash_utils.dart b/pkg/crypto/lib/src/hash_utils.dart
index 84df9d0e4826edde02f9764f52f43423bcbab6a6..1d90e699b439dbf0f5dee9239cfaff45b5f7ec0b 100644
--- a/pkg/crypto/lib/src/hash_utils.dart
+++ b/pkg/crypto/lib/src/hash_utils.dart
@@ -22,6 +22,15 @@ int _rotl32(int val, int shift) {
// Base class encapsulating common behavior for cryptographic hash
// functions.
abstract class _HashBase implements Hash {
+ final int _chunkSizeInWords;
+ final int _digestSizeInWords;
+ final bool _bigEndianWords;
+ final List<int> _currentChunk;
+ final List<int> _h;
+ int _lengthInBytes = 0;
+ List<int> _pendingData;
+ bool _digestCalled = false;
+
_HashBase(int chunkSizeInWords,
int digestSizeInWords,
bool this._bigEndianWords)
@@ -139,14 +148,4 @@ abstract class _HashBase implements Hash {
_pendingData.addAll(_wordToBytes(0));
}
}
-
- // Hasher state.
- final int _chunkSizeInWords;
- final int _digestSizeInWords;
- final bool _bigEndianWords;
- int _lengthInBytes = 0;
- List<int> _pendingData;
- final List<int> _currentChunk;
- final List<int> _h;
- bool _digestCalled = false;
}
« no previous file with comments | « pkg/crypto/lib/src/crypto_utils.dart ('k') | pkg/crypto/lib/src/hmac.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698