diff --git a/src/digest.rs b/src/digest.rs index 685b904ec..317482283 100644 --- a/src/digest.rs +++ b/src/digest.rs @@ -94,7 +94,7 @@ impl FromStr for DigestData { impl From for DigestData { fn from(s: DigestComputer) -> DigestData { let mut result = DigestData::zeros(); - let res = s.result(); + let res = s.finalize(); result.0.copy_from_slice(res.as_slice()); result } diff --git a/src/io/cached_itarbundle.rs b/src/io/cached_itarbundle.rs index 9c6e9a328..e2d0f46c4 100644 --- a/src/io/cached_itarbundle.rs +++ b/src/io/cached_itarbundle.rs @@ -608,7 +608,7 @@ impl CachedITarBundle { let length = content.len(); let mut digest_builder = digest::create(); - digest_builder.input(&content); + digest_builder.update(&content); let digest = DigestData::from(digest_builder); diff --git a/src/io/mod.rs b/src/io/mod.rs index ba7e2221b..c2e3a299d 100644 --- a/src/io/mod.rs +++ b/src/io/mod.rs @@ -196,7 +196,7 @@ impl Read for InputHandle { self.ever_read = true; let n = self.inner.read(buf)?; if !self.read_only { - self.digest.input(&buf[..n]); + self.digest.update(&buf[..n]); } Ok(n) } @@ -280,7 +280,7 @@ impl OutputHandle { impl Write for OutputHandle { fn write(&mut self, buf: &[u8]) -> io::Result { let n = self.inner.write(buf)?; - self.digest.input(&buf[..n]); + self.digest.update(&buf[..n]); Ok(n) }