Skip to content

Commit a68f115

Browse files
committed
change!: drop migration shims for fallible hashing
Since the APIs were already adjusted and all callers migrated, we only need to drop the migration shims.
1 parent 3d7e379 commit a68f115

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

gix-hash/src/hasher/mod.rs

-6
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@ impl Hasher {
5757
}),
5858
}
5959
}
60-
61-
/// Finalize the hash and produce an object ID.
62-
#[inline]
63-
pub fn finalize(self) -> crate::ObjectId {
64-
self.try_finalize().expect("Detected SHA-1 collision attack")
65-
}
6660
}
6761

6862
/// Produce a hasher suitable for the given kind of hash.

gix-object/src/lib.rs

-9
Original file line numberDiff line numberDiff line change
@@ -416,15 +416,6 @@ pub fn compute_hash(
416416
hasher.try_finalize()
417417
}
418418

419-
/// A function to compute a hash of kind `hash_kind` for an object of `object_kind` and its `data`.
420-
pub fn try_compute_hash(
421-
hash_kind: gix_hash::Kind,
422-
object_kind: Kind,
423-
data: &[u8],
424-
) -> Result<gix_hash::ObjectId, gix_hash::hasher::Error> {
425-
compute_hash(hash_kind, object_kind, data)
426-
}
427-
428419
/// A function to compute a hash of kind `hash_kind` for an object of `object_kind` and its data read from `stream`
429420
/// which has to yield exactly `stream_len` bytes.
430421
/// Use `progress` to learn about progress in bytes processed and `should_interrupt` to be able to abort the operation

0 commit comments

Comments
 (0)