| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library crypto.hash; | |
| 6 | |
| 7 import 'dart:convert'; | 5 import 'dart:convert'; |
| 8 | 6 |
| 9 import 'digest.dart'; | 7 import 'digest.dart'; |
| 10 import 'digest_sink.dart'; | 8 import 'digest_sink.dart'; |
| 11 | 9 |
| 12 /// An interface for cryptographic hash functions. | 10 /// An interface for cryptographic hash functions. |
| 13 /// | 11 /// |
| 14 /// Every hash is a converter that takes a list of ints and returns a single | 12 /// Every hash is a converter that takes a list of ints and returns a single |
| 15 /// digest. When used in chunked mode, it will only ever add one digest to the | 13 /// digest. When used in chunked mode, it will only ever add one digest to the |
| 16 /// inner [Sink]. | 14 /// inner [Sink]. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 53 |
| 56 /// Finish the hash computation and extract the message digest as a list of | 54 /// Finish the hash computation and extract the message digest as a list of |
| 57 /// bytes. | 55 /// bytes. |
| 58 @Deprecated("Expires in 1.0.0. Use Hash.convert() or " | 56 @Deprecated("Expires in 1.0.0. Use Hash.convert() or " |
| 59 "Hash.startChunkedConversion() instead.") | 57 "Hash.startChunkedConversion() instead.") |
| 60 List<int> close() { | 58 List<int> close() { |
| 61 _sink.close(); | 59 _sink.close(); |
| 62 return _innerSink.value.bytes; | 60 return _innerSink.value.bytes; |
| 63 } | 61 } |
| 64 } | 62 } |
| OLD | NEW |