summaryrefslogtreecommitdiff
path: root/src/io.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/io.rs')
-rw-r--r--src/io.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/io.rs b/src/io.rs
index 86f91c6..324d12c 100644
--- a/src/io.rs
+++ b/src/io.rs
@@ -1,10 +1,7 @@
// Copyright © 2022 Kim Altintop <kim@eagain.io>
// SPDX-License-Identifier: GPL-2.0-only WITH openvpn-openssl-exception
-use sha2::{
- digest::generic_array::GenericArray,
- Digest,
-};
+use digest::Digest;
/// Created by [`Lines::until_blank`], stops iteration at the first blank line.
pub struct UntilBlank<B> {
@@ -94,8 +91,8 @@ impl<D, W> HashWriter<D, W>
where
D: Digest,
{
- pub fn hash(self) -> GenericArray<u8, D::OutputSize> {
- self.hasher.finalize()
+ pub fn hasher(&self) -> &D {
+ &self.hasher
}
}