File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -240,7 +240,12 @@ pub trait Hash {
240
240
/// [`write_u8`]: #method.write_u8
241
241
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
242
242
pub trait Hasher {
243
- /// Completes a round of hashing, producing the output hash generated.
243
+ /// Returns the hash value for the values written so far.
244
+ ///
245
+ /// Despite its name, the method does not reset the hasher’s internal
246
+ /// state. Additional [`write`]s will continue from the current value.
247
+ /// If you need to start a fresh hash value, you will have to create
248
+ /// a new hasher.
244
249
///
245
250
/// # Examples
246
251
///
@@ -253,6 +258,8 @@ pub trait Hasher {
253
258
///
254
259
/// println!("Hash is {:x}!", hasher.finish());
255
260
/// ```
261
+ ///
262
+ /// ['write']: #tymethod.write
256
263
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
257
264
fn finish ( & self ) -> u64 ;
258
265
You can’t perform that action at this time.
0 commit comments