Skip to content

Use random_bytes function to generate mask#22

Merged
GrahamCampbell merged 1 commit intochrome-php:1.7from
divinity76:nit-gen-mask
May 1, 2025
Merged

Use random_bytes function to generate mask#22
GrahamCampbell merged 1 commit intochrome-php:1.7from
divinity76:nit-gen-mask

Conversation

@divinity76
Copy link

@divinity76 divinity76 commented Apr 26, 2025

The original code was written for PHP<=5 where random_bytes did not exist yet.

Since PHP7.0.0 there is no reason to use openssl_random_pseudo_bytes or fallback to mt_rand/uniqid,
random_bytes is always available.

@GrahamCampbell GrahamCampbell changed the title nitpick generateMask Use random_bytes function to generate mask May 1, 2025
@GrahamCampbell GrahamCampbell merged commit 18aab05 into chrome-php:1.7 May 1, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants