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

Unified Diff: lib/src/hash.dart

Issue 1819293003: Remove deprecated APIs. (Closed) Base URL: git@github.com:dart-lang/crypto.git@master
Patch Set: Created 4 years, 9 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/src/crypto_utils.dart ('k') | lib/src/hmac.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/hash.dart
diff --git a/lib/src/hash.dart b/lib/src/hash.dart
index 9714f4246a3cdc4e4656189decf5a8537f0654a1..fad44aee80a3a59ca83d6930d44cf7b0852ab311 100644
--- a/lib/src/hash.dart
+++ b/lib/src/hash.dart
@@ -15,20 +15,11 @@ import 'digest_sink.dart';
abstract class Hash extends Converter<List<int>, Digest> {
/// The internal block size of the hash in bytes.
///
- /// This is exposed for use by the [HMAC] class, which needs to know the block
+ /// This is exposed for use by the [Hmac] class, which needs to know the block
/// size for the [Hash] it uses.
int get blockSize;
- /// The sink for implementing the deprecated APIs that involved adding data
- /// directly to the [Hash] instance.
- ByteConversionSink _sink;
-
- /// The sink that [_sink] sends the [Digest] to once it finishes hashing.
- final DigestSink _innerSink = new DigestSink();
-
- Hash() {
- _sink = startChunkedConversion(_innerSink);
- }
+ const Hash();
Digest convert(List<int> data) {
var innerSink = new DigestSink();
@@ -39,25 +30,4 @@ abstract class Hash extends Converter<List<int>, Digest> {
}
ByteConversionSink startChunkedConversion(Sink<Digest> sink);
-
- /// This is deprecated.
- ///
- /// Use [startChunkedConversion] instead.
- @Deprecated("Will be removed in crypto 1.0.0.")
- Hash newInstance();
-
- /// This is deprecated.
- ///
- /// Use [convert] or [startChunkedConversion] instead.
- @Deprecated("Will be removed in crypto 1.0.0.")
- void add(List<int> data) => _sink.add(data);
-
- /// This is deprecated.
- ///
- /// Use [convert] or [startChunkedConversion] instead.
- @Deprecated("Will be removed in crypto 1.0.0.")
- List<int> close() {
- _sink.close();
- return _innerSink.value.bytes;
- }
}
« no previous file with comments | « lib/src/crypto_utils.dart ('k') | lib/src/hmac.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698