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

Side by Side Diff: lib/src/hash.dart

Issue 1350933002: Stop using parts. (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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 library crypto.hash;
6
7 /**
8 * Interface for cryptographic hash functions.
9 *
10 * The [add] method is used to add data to the hash. The [close] method
11 * is used to extract the message digest.
12 *
13 * Once the [close] method has been called no more data can be added using the
14 * [add] method. If [add] is called after the first call to [close] a
15 * HashException is thrown.
16 *
17 * If multiple instances of a given Hash is needed the [newInstance]
18 * method can provide a new instance.
19 */
20 // TODO(floitsch): make Hash implement Sink, EventSink or similar.
21 abstract class Hash {
22 /**
23 * Add a list of bytes to the hash computation.
24 */
25 void add(List<int> data);
26
27 /**
28 * Finish the hash computation and extract the message digest as
29 * a list of bytes.
30 */
31 List<int> close();
32
33 /**
34 * Returns a new instance of this hash function.
35 */
36 Hash newInstance();
37
38 /**
39 * Internal block size of the hash in bytes.
40 *
41 * This is exposed for use by the HMAC class which needs to know the
42 * block size for the [Hash] it is using.
43 */
44 int get blockSize;
45 }
OLDNEW
« no previous file with comments | « lib/src/crypto_utils.dart ('k') | lib/src/hash_base.dart » ('j') | lib/src/hash_base.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698