Skip to content

Commit d379c84

Browse files
committed
Update to rust-crypto 0.9.0, with breaking API changes
Cf. RustCrypto/traits#43 . I believe that we end up re-exporting these APIs, so this is could be a breaking change for API consumers, although it's not an API that we expect many people to be using themselves.
1 parent 65192a0 commit d379c84

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/digest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ impl FromStr for DigestData {
9494
impl From<DigestComputer> for DigestData {
9595
fn from(s: DigestComputer) -> DigestData {
9696
let mut result = DigestData::zeros();
97-
let res = s.result();
97+
let res = s.finalize();
9898
result.0.copy_from_slice(res.as_slice());
9999
result
100100
}

src/io/cached_itarbundle.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ impl CachedITarBundle {
608608
let length = content.len();
609609

610610
let mut digest_builder = digest::create();
611-
digest_builder.input(&content);
611+
digest_builder.update(&content);
612612

613613
let digest = DigestData::from(digest_builder);
614614

src/io/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ impl Read for InputHandle {
196196
self.ever_read = true;
197197
let n = self.inner.read(buf)?;
198198
if !self.read_only {
199-
self.digest.input(&buf[..n]);
199+
self.digest.update(&buf[..n]);
200200
}
201201
Ok(n)
202202
}
@@ -280,7 +280,7 @@ impl OutputHandle {
280280
impl Write for OutputHandle {
281281
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
282282
let n = self.inner.write(buf)?;
283-
self.digest.input(&buf[..n]);
283+
self.digest.update(&buf[..n]);
284284
Ok(n)
285285
}
286286

0 commit comments

Comments
 (0)