File: Revert-Update-getrandom-and-bcrypt.patch

package info (click to toggle)
python-bcrypt 5.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 220 kB
  • sloc: python: 506; makefile: 19; sh: 4
file content (41 lines) | stat: -rw-r--r-- 1,122 bytes parent folder | download
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
From: Bastian Germann <bage@debian.org>
Date: Wed, 10 Sep 2025 16:22:10 +0200
Subject: Revert "Update getrandom and bcrypt (#966)"

This reverts commit 3181f2101ab370c73b1cbb83c38cb110e25d1fcb.
---
 src/_bcrypt/Cargo.toml | 4 ++--
 src/_bcrypt/src/lib.rs | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/_bcrypt/Cargo.toml b/src/_bcrypt/Cargo.toml
index 5e29663..27cbc09 100644
--- a/src/_bcrypt/Cargo.toml
+++ b/src/_bcrypt/Cargo.toml
@@ -9,11 +9,11 @@ publish = false
 
 [dependencies]
 pyo3 = { version = "0.26", features = ["abi3"] }
-bcrypt = "0.17"
+bcrypt = "0.15"
 bcrypt-pbkdf = "0.10.0"
 base64 = "0.22.1"
 subtle = "2.6"
-getrandom = "0.3"
+getrandom = "0.2"
 
 [features]
 extension-module = ["pyo3/extension-module"]
diff --git a/src/_bcrypt/src/lib.rs b/src/_bcrypt/src/lib.rs
index ad38fdf..e0df356 100644
--- a/src/_bcrypt/src/lib.rs
+++ b/src/_bcrypt/src/lib.rs
@@ -45,7 +45,7 @@ fn gensalt<'p>(
     }
 
     let mut salt = [0; 16];
-    getrandom::fill(&mut salt).unwrap();
+    getrandom::getrandom(&mut salt).unwrap();
 
     let encoded_salt = BASE64_ENGINE.encode(salt);