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

Unified Diff: lib/crypto/sha256.dart

Issue 10170027: Implement HMAC support in lib/crypto. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update after test renaming. Added back lib testing in test.dart." Created 8 years, 8 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 | « lib/crypto/sha1.dart ('k') | lib/crypto/sha_utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/crypto/sha256.dart
diff --git a/lib/crypto/sha256.dart b/lib/crypto/sha256.dart
index f9e836c76900079ffab8a6ca0502c24009b20d36..f9bb11f164da486ab78949337a48f06d0456a293 100644
--- a/lib/crypto/sha256.dart
+++ b/lib/crypto/sha256.dart
@@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
// The SHA256 hasher is used to compute an SHA256 message digest.
-class _SHA256 extends _SHACryptoHashBase implements SHA256 {
+class _SHA256 extends _SHAHashBase implements SHA256 {
// Construct a SHA256 hasher object.
_SHA256() : _w = new List(64), super(16, 8) {
// Initial value of the hash parts. First 32 bits of the fractional parts
@@ -18,6 +18,11 @@ class _SHA256 extends _SHACryptoHashBase implements SHA256 {
_h[7] = 0x5be0cd19;
}
+ // Returns a new instance of this Hash.
+ SHA256 newInstance() {
+ return new SHA256();
+ }
+
// Table of round constants. First 32 bits of the fractional
// parts of the cube roots of the first 64 prime numbers.
static final List<int> _K =
« no previous file with comments | « lib/crypto/sha1.dart ('k') | lib/crypto/sha_utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698