From ae113f91fefff415898781272b892d670fcb46f4 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 14 Jun 2026 17:18:44 +0900 Subject: feat(php-shim): implement random_int/random_bytes with fastrand PHP's random_int/random_bytes are cryptographically secure, but Composer does not rely on that property, so a non-cryptographic PRNG suffices. Co-Authored-By: Claude Opus 4.8 --- crates/shirabe/src/cache.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/shirabe/src/cache.rs') diff --git a/crates/shirabe/src/cache.rs b/crates/shirabe/src/cache.rs index a193d0b..636a8ed 100644 --- a/crates/shirabe/src/cache.rs +++ b/crates/shirabe/src/cache.rs @@ -267,7 +267,7 @@ impl Cache { return false; } - random_int(0, 50) == 0 + random_int(0..50) == 0 } pub fn remove(&mut self, file: &str) -> bool { -- cgit v1.3.1