Fix root crate compilation dependencies to force sha1*

This commit is contained in:
Igor Katson 2024-08-28 13:32:42 +01:00
parent 9eed5aeb07
commit 0214817122
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
7 changed files with 47 additions and 3 deletions

View file

@ -16,5 +16,6 @@ sha1-crypto-hash = ["crypto-hash"]
sha1-ring = ["ring"]
[dependencies]
assert_cfg = "0.1.0"
crypto-hash = { version = "0.3", optional = true }
ring = { version = "0.17", optional = true }

View file

@ -11,6 +11,11 @@ pub trait ISha1 {
fn finish(self) -> [u8; 20];
}
assert_cfg::exactly_one! {
feature = "sha1-crypto-hash",
feature = "sha1-ring",
}
#[cfg(feature = "sha1-crypto-hash")]
mod crypto_hash_impl {
use super::ISha1;