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

Unified Diff: lib/src/hash.dart

Issue 1348983002: Update documentation comments. (Closed) Base URL: git@github.com:dart-lang/crypto.git@master
Patch Set: Created 5 years, 3 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/hash_base.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 03d4b1cb770a35d486d8f3776d2b050f98142848..5defe575a1cea9784b8ac891cabf24980e01aea8 100644
--- a/lib/src/hash.dart
+++ b/lib/src/hash.dart
@@ -4,42 +4,30 @@
library crypto.hash;
-/**
- * Interface for cryptographic hash functions.
- *
- * The [add] method is used to add data to the hash. The [close] method
- * is used to extract the message digest.
- *
- * Once the [close] method has been called no more data can be added using the
- * [add] method. If [add] is called after the first call to [close] a
- * HashException is thrown.
- *
- * If multiple instances of a given Hash is needed the [newInstance]
- * method can provide a new instance.
- */
+/// An interface for cryptographic hash functions.
+///
+/// The [add] method adds data to the hash. The [close] method extracts the
+/// message digest.
+///
+/// If multiple instances of a given Hash is needed, the [newInstance] method can
Bob Nystrom 2015/09/17 17:11:56 Long.
nweiz 2015/09/17 20:06:41 Done.
+/// provide a new instance.
// TODO(floitsch): make Hash implement Sink, EventSink or similar.
abstract class Hash {
- /**
- * Add a list of bytes to the hash computation.
- */
+ /// Add a list of bytes to the hash computation.
+ ///
+ /// If [this] has already been closed, throws a [StateError].
void add(List<int> data);
- /**
- * Finish the hash computation and extract the message digest as
- * a list of bytes.
- */
+ /// Finish the hash computation and extract the message digest as a list of
+ /// bytes.
List<int> close();
- /**
- * Returns a new instance of this hash function.
- */
+ /// Returns a new instance of this hash function.
Hash newInstance();
- /**
- * Internal block size of the hash in bytes.
- *
- * This is exposed for use by the HMAC class which needs to know the
- * block size for the [Hash] it is using.
- */
+ /// The internal block size of the hash in bytes.
+ ///
+ /// This is exposed for use by the [HMAC] class, which needs to know the block
+ /// size for the [Hash] it uses.
int get blockSize;
}
« no previous file with comments | « lib/src/crypto_utils.dart ('k') | lib/src/hash_base.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698