diff --git a/Cargo.toml b/Cargo.toml
index 34babc6..7d84b29 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -86,7 +86,7 @@ optional = true
 version = ">= 0.12, < 2"
 
 [dev-dependencies.getrandom]
-version = "0.2"
+version = "0.4"
 
 [dev-dependencies.hex-literal]
 version = "0.4"
diff --git a/tests/random.rs b/tests/random.rs
index 60de22d..372c18c 100644
--- a/tests/random.rs
+++ b/tests/random.rs
@@ -6,7 +6,7 @@ mod sha1_oracle {
 
     fn initialize() -> digest::Output<Sha1CD> {
         let mut d = digest::Output::<Sha1CD>::default();
-        getrandom::getrandom(&mut d[..]).unwrap();
+        getrandom::fill(&mut d[..]).unwrap();
         d
     }
 
