1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
--- a/src/sha1.rs
+++ b/src/sha1.rs
@@ -1,6 +1,6 @@
#[cfg(feature = "v5")]
pub(crate) fn hash(ns: &[u8], src: &[u8]) -> [u8; 16] {
- use sha1_smol::Sha1;
+ use sha1::{Digest,Sha1};
let mut hasher = Sha1::new();
@@ -8,7 +8,7 @@
hasher.update(src);
let mut bytes = [0; 16];
- bytes.copy_from_slice(&hasher.digest().bytes()[..16]);
+ bytes.copy_from_slice(&hasher.finalize()[..16]);
bytes
}
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -120,7 +120,7 @@
"uuid-rng-internal-lib",
"uuid-rng-internal-lib/rand",
]
-sha1 = ["dep:sha1_smol"]
+sha1 = ["dep:sha1"]
std = []
v1 = ["atomic"]
v3 = ["md5"]
@@ -168,8 +168,8 @@
optional = true
default-features = false
-[dependencies.sha1_smol]
-version = "1"
+[dependencies.sha1]
+version = "0.10"
optional = true
default-features = false
|