Tag: randomness
Weak Random Function
PHP 7.0+
Using rand(), mt_rand(), or array_rand() for security-sensitive values — these are predictable pseudo-random generators not suitable for tokens, keys, or passwords.
6mo ago
Security intermediate
CSPRNG
PHP 7.0+
1
Cryptographically Secure Pseudo-Random Number Generator — produces unpredictable values suitable for security tokens.
6mo ago
Security intermediate
random_bytes()
PHP 7.0+
3
Generates cryptographically secure random bytes from the OS entropy source — use for tokens, salts, and nonces.
6mo ago
PHP intermediate