diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-14 17:18:44 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-14 17:23:13 +0900 |
| commit | ae113f91fefff415898781272b892d670fcb46f4 (patch) | |
| tree | 5d433f1902c0834973b6e5816d10629ca4a5b675 /crates/shirabe/src/cache.rs | |
| parent | e71e24b5b5cacb93aab3a62e809414fbe9c8a438 (diff) | |
| download | php-shirabe-ae113f91fefff415898781272b892d670fcb46f4.tar.gz php-shirabe-ae113f91fefff415898781272b892d670fcb46f4.tar.zst php-shirabe-ae113f91fefff415898781272b892d670fcb46f4.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/cache.rs')
| -rw-r--r-- | crates/shirabe/src/cache.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |
